Package de.sbg.unity.configmanager
Klasse ConfigData
java.lang.Object
de.sbg.unity.configmanager.ConfigData
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungConfigData(String path) Create a new ConfigManager (Default) (Output: Config.properties)ConfigData(String path, String name) Create new ConfigManager with own name (Example: Config.properties)ConfigData(String path, String name, String extention) Create new ConfigManager with own name and extention (Example: Config.config) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaddCommend(String command) Add a commend line to the properties filevoidAdd a empty line to the properties filevoidaddSetting(String key, Object value) Add a setting to the properties filevoidCreate a new properties file.getFile()getKeys()Get a List of the existing keysgetSetting(String key) Get the value of the settingbooleanDose something change in the configbooleanvoidsetSetting(String key, Object value) Change a setting in the game and in the properties file
-
Konstruktordetails
-
ConfigData
Create a new ConfigManager (Default) (Output: Config.properties)- Parameter:
path- The path of the plugin- Löst aus:
IOException- See Javadoc from Java
-
ConfigData
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
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
Create a new properties file. If old settings are available, they will be adopted.- Löst aus:
IOException
-
setSetting
Change a setting in the game and in the properties file- Parameter:
key- The key of the existing setting as Stringvalue- The new value of the setting
-
getSetting
Get the value of the setting- Parameter:
key- The key of the setting as String- Gibt zurück:
- Value returns as 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
Add a commend line to the properties file- Parameter:
command- The command as String
-
addSetting
Add a setting to the properties file- Parameter:
key- The key of the setting as Stringvalue- The value of the setting as Object
-
addEmptyLine
public void addEmptyLine()Add a empty line to the properties file -
getConfigName
-
getExtention
-
getFile
-
getFullpath
-
isOldExist
public boolean isOldExist()
-