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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user