Package me.hsgamer.hscore.config.path
Interface ConfigPath<T>
- Type Parameters:
T- the type of the value
- All Known Implementing Classes:
AdvancedConfigPath,BaseConfigPath,BooleanConfigPath,CommentablePath,DoubleConfigPath,FloatConfigPath,IntegerConfigPath,LongConfigPath,MapConfigPath,SerializableMapConfigPath,SimpleConfigPath,StickyConfigPath,StringConfigPath
public interface ConfigPath<T>
The interface of ConfigPath classes
-
Method Summary
Modifier and TypeMethodDescription@Nullable ConfigGet the config@NotNull StringgetPath()Get the path to the valuegetValue()Get the valueGet the value from the config.default voidmigrateConfig(@NotNull Config config) Manually update the config (Mainly used when updating new settings)default voidreload()Reload the pathdefault voidsetAndSave(T value) Set the value and save the configdefault voidsetAndSave(T value, @NotNull Config config) Set the value and save the configvoidSet the config.voidSet the valuevoidSet the value to the config.
-
Method Details
-
getValue
T getValue()Get the value- Returns:
- the value
-
setValue
Set the value- Parameters:
value- the value
-
getValue
Get the value from the config. This is used to get the value from multiple configs.- Parameters:
config- the config- Returns:
- the value
-
setValue
Set the value to the config. This is used to set the value to multiple configs.- Parameters:
value- the valueconfig- the config
-
getPath
Get the path to the value- Returns:
- the path
-
getConfig
Get the config- Returns:
- the config
-
setConfig
Set the config.- Parameters:
config- the config
-
migrateConfig
Manually update the config (Mainly used when updating new settings)- Parameters:
config- the config
-
reload
default void reload()Reload the path -
setAndSave
Set the value and save the config- Parameters:
value- the valueconfig- the config
-
setAndSave
Set the value and save the config- Parameters:
value- the value
-