1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-21 03:03:02 +01:00

Advanced Config is now on the new config system

This commit is contained in:
nossr50
2019-02-12 01:52:20 -08:00
parent 78f0a42ec1
commit e7b91f57ea
4 changed files with 102 additions and 481 deletions

View File

@@ -72,7 +72,7 @@ public abstract class ConfigLoaderConfigurable implements DefaultKeys {
List<String> validKeyErrors = validateKeys(); // Validate Keys
if(validKeyErrors.size() > 0)
if(validKeyErrors != null && validKeyErrors.size() > 0)
{
for(String error : validKeyErrors)
{
@@ -281,4 +281,29 @@ public abstract class ConfigLoaderConfigurable implements DefaultKeys {
protected ConfigurationNode getUserRootNode() {
return userRootNode;
}
/**
* Attempts to get an int value from the config
* @param path path the node from the root node
* @return int value of the node
*/
int getIntValue(String path)
{
return userRootNode.getNode(path).getInt();
}
double getDoubleValue(String path)
{
return userRootNode.getNode(path).getDouble();
}
boolean getBooleanValue(String path)
{
return userRootNode.getNode(path).getBoolean();
}
String getStringValue(String path)
{
return userRootNode.getNode(path).getString();
}
}