Class Config
java.lang.Object
com.plotsquared.core.configuration.Config
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe names of any default blocks.static interfaceCreates a comment.static classstatic interfaceIndicates that a field should be instantiated / created.static interfaceIndicates that a field cannot be modified.static interfaceAny field or class with is not part of the config. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TGet the value for a node
Probably throws some error if you try to get a non existent keygetFields(Class<Settings.Enabled_Components> clazz)Get the static fields in a section.static booleanstatic voidSet all values in the file (load first to avoid overwriting)static voidSet the value of a specific node
Probably throws some error if you supply non existing keys or invalid values
-
Constructor Details
-
Config
public Config()
-
-
Method Details
-
get
Get the value for a node
Probably throws some error if you try to get a non existent key- Type Parameters:
T- value type- Parameters:
key- configuration keyroot- configuration class- Returns:
- value
-
set
Set the value of a specific node
Probably throws some error if you supply non existing keys or invalid values- Parameters:
key- config nodevalue- valueroot- configuration class
-
load
-
save
Set all values in the file (load first to avoid overwriting)- Parameters:
file- fileroot- configuration file class
-
getFields
Get the static fields in a section.- Parameters:
clazz- config section- Returns:
- map or string against object of static fields
-