Class ConfigUpdater
java.lang.Object
com.ordwen.odailyquests.tools.updater.config.ConfigUpdater
- All Implemented Interfaces:
IConfigUpdater
- Direct Known Subclasses:
Update223to224,Update225to230,Update230to300,Update301to302
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidparameterReplaced(String oldParameter, String newParameter) Notify the user that a parameter has been replaced by another.protected voidremoveConfigItem(String path, org.bukkit.configuration.file.FileConfiguration fileConfiguration, File file) Remove a parameter from a file.protected voidsetDefaultConfigItem(String path, Object value, org.bukkit.configuration.file.FileConfiguration fileConfiguration, File file, boolean replace) Add a default parameter in a file if it is missing.protected voidupdateVersion(String version) Update the version in the configuration file.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ordwen.odailyquests.tools.updater.config.IConfigUpdater
apply
-
Field Details
-
configFile
-
config
protected final org.bukkit.configuration.file.FileConfiguration config -
playerInterfaceFile
-
playerInterface
protected final org.bukkit.configuration.file.FileConfiguration playerInterface
-
-
Constructor Details
-
ConfigUpdater
-
-
Method Details
-
setDefaultConfigItem
protected void setDefaultConfigItem(String path, Object value, org.bukkit.configuration.file.FileConfiguration fileConfiguration, File file, boolean replace) Add a default parameter in a file if it is missing.- Parameters:
path- path of the parameter to addvalue- default value of the parameter to addfileConfiguration- file configuration where add the parameterfile- file to save the configurationreplace- whether to replace the parameter if it already exists
-
removeConfigItem
protected void removeConfigItem(String path, org.bukkit.configuration.file.FileConfiguration fileConfiguration, File file) Remove a parameter from a file.- Parameters:
path- path of the parameter to removefileConfiguration- file configuration where remove the parameterfile- file to save the configuration
-
parameterReplaced
Notify the user that a parameter has been replaced by another.- Parameters:
oldParameter- old parameternewParameter- new parameter
-
updateVersion
Update the version in the configuration file.- Parameters:
version- new version
-