Klasse ConfigData

java.lang.Object
de.sbg.unity.configmanager.ConfigData

public class ConfigData extends Object
  • Konstruktordetails

    • ConfigData

      public ConfigData(String path) throws IOException
      Create a new ConfigManager (Default) (Output: Config.properties)
      Parameter:
      path - The path of the plugin
      Löst aus:
      IOException - See Javadoc from Java
    • ConfigData

      public ConfigData(String path, String name) throws IOException
      Create new ConfigManager with own name (Example: Config.properties)
      Parameter:
      path - The path of the plugin.
      name - The name of the propertie file.
      Löst aus:
      IOException
    • ConfigData

      public ConfigData(String path, String name, String extention) throws IOException
      Create new ConfigManager with own name and extention (Example: Config.config)
      Parameter:
      path - The path of the plugin.
      name - The name of the properties file.
      extention - The extention of the properties file.
      Löst aus:
      IOException
  • Methodendetails

    • CreateConfig

      public void CreateConfig() throws IOException
      Create a new properties file. If old settings are available, they will be adopted.
      Löst aus:
      IOException
    • setSetting

      public void setSetting(String key, Object value)
      Change a setting in the game and in the properties file
      Parameter:
      key - The key of the existing setting as String
      value - The new value of the setting
    • getSetting

      public String getSetting(String key)
      Get the value of the setting
      Parameter:
      key - The key of the setting as String
      Gibt zurück:
      Value returns as String
    • getKeys

      public ArrayList<String> getKeys()
      Get a List of the existing keys
      Gibt zurück:
      A ArrayList of String of existing keys
    • hatChange

      public boolean hatChange()
      Dose something change in the config
      Gibt zurück:
      True, if something is changed, else if not.
    • addCommend

      public void addCommend(String command)
      Add a commend line to the properties file
      Parameter:
      command - The command as String
    • addSetting

      public void addSetting(String key, Object value)
      Add a setting to the properties file
      Parameter:
      key - The key of the setting as String
      value - The value of the setting as Object
    • addEmptyLine

      public void addEmptyLine()
      Add a empty line to the properties file
    • getConfigName

      public String getConfigName()
    • getExtention

      public String getExtention()
    • getFile

      public File getFile()
    • getFullpath

      public String getFullpath()
    • isOldExist

      public boolean isOldExist()