Package me.neznamy.tab.shared.config
Class Converter
java.lang.Object
me.neznamy.tab.shared.config.Converter
Configuration converter that converts configuration files from practically
any previous version of TAB to the current format.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconvertAnimationFile(me.neznamy.tab.api.config.ConfigurationFile animations) Converts animation file from old format with everything under "animations" key to new format which does not use the redundant key anymore.voidconvertToV3(me.neznamy.tab.api.config.ConfigurationFile currentConfig) Converts all configuration files from 2.9.2 into new 3.0.0 format and saves a copy of old files into a new "old_configs" folder.voidremoveOldOptions(me.neznamy.tab.api.config.ConfigurationFile config)
-
Constructor Details
-
Converter
public Converter()
-
-
Method Details
-
convertAnimationFile
public void convertAnimationFile(me.neznamy.tab.api.config.ConfigurationFile animations) Converts animation file from old format with everything under "animations" key to new format which does not use the redundant key anymore.The method contains a check if the conversion is necessary, so it is always safe to call this method, even if conversion is not needed.
This change was made from 2.8.10 -> 2.9.0
- Parameters:
animations- animation file to convert
-
convertToV3
public void convertToV3(me.neznamy.tab.api.config.ConfigurationFile currentConfig) throws IOException Converts all configuration files from 2.9.2 into new 3.0.0 format and saves a copy of old files into a new "old_configs" folder.- Parameters:
currentConfig- currently detected config.yml file- Throws:
IOException- if an I/O operation with the files fails
-
removeOldOptions
public void removeOldOptions(me.neznamy.tab.api.config.ConfigurationFile config)
-