Class ApplicationConfig

java.lang.Object
com.adventure.config.ApplicationConfig
All Implemented Interfaces:
Config

public class ApplicationConfig extends Object implements Config
Class that implements configuration object.
  • Constructor Details

    • ApplicationConfig

      public ApplicationConfig(Properties properties) throws ConfigurationException
      Creates configuration object from a properties.
      Parameters:
      properties - Application properties loaded.
      Throws:
      ConfigurationException - If some error occur while generating the configuration object.
  • Method Details

    • getDisplayWidth

      public int getDisplayWidth()
      Description copied from interface: Config
      Default display width.
      Specified by:
      getDisplayWidth in interface Config
      Returns:
      Initial display width.
    • getConfigFolder

      public String getConfigFolder()
      Description copied from interface: Config
      Default setting folder
      Specified by:
      getConfigFolder in interface Config
      Returns:
      The path (relative to the .jar) where saves and setting are contained
    • getDisplayHeight

      public int getDisplayHeight()
      Description copied from interface: Config
      Default display height.
      Specified by:
      getDisplayHeight in interface Config
      Returns:
      Initial display height.
    • isResizable

      public boolean isResizable()
      Description copied from interface: Config
      Tells if the window is resizable or not.
      Specified by:
      isResizable in interface Config
      Returns:
      True if the window is resizable, false otherwise.
    • getStorageServiceType

      public SupportedStorage getStorageServiceType()
      Description copied from interface: Config
      Gets type of storage service.
      Specified by:
      getStorageServiceType in interface Config
      Returns:
      Type of the current storage service.
    • getStorageService

      public StorageService getStorageService()
      Description copied from interface: Config
      Gets storage service.
      Specified by:
      getStorageService in interface Config
      Returns:
      Current storage service.
    • getMonsterAttackProbability

      public double getMonsterAttackProbability()
      Description copied from interface: Config
      Gets the probability that a monster attacks during a fight.
      Specified by:
      getMonsterAttackProbability in interface Config
      Returns:
      Monster attack probability.
    • getMonsterDodgeProbability

      public double getMonsterDodgeProbability()
      Description copied from interface: Config
      Gets the probability that a monster dodges during a fight.
      Specified by:
      getMonsterDodgeProbability in interface Config
      Returns:
      Monster dodges during a fight.
    • getAppTitle

      public String getAppTitle()
      Description copied from interface: Config
      App title getter;
      Specified by:
      getAppTitle in interface Config
      Returns:
      Default app title.
    • getPlayerStats

      public Stats getPlayerStats()
      Description copied from interface: Config
      Default player stats getter.
      Specified by:
      getPlayerStats in interface Config
      Returns:
      Default player stats.
    • getPlayerMaxDodges

      public int getPlayerMaxDodges()
      Description copied from interface: Config
      Max dodges for the player.
      Specified by:
      getPlayerMaxDodges in interface Config
      Returns:
      Max dodges for the player.
    • getProperties

      public Properties getProperties()
      Description copied from interface: Config
      Properties getter.
      Specified by:
      getProperties in interface Config
      Returns:
      Current properties.