Validate advanced.yml settings

This commit is contained in:
TfT_02
2013-07-29 00:37:13 +02:00
parent 7683dfc436
commit 24b1485555
2 changed files with 776 additions and 7 deletions

View File

@ -67,7 +67,7 @@ public class Config extends AutoUpdateConfigLoader {
}
/* Database Purging */
if (getPurgeInterval() <= -1) {
if (getPurgeInterval() < -1) {
reason.add("Database_Purging.Purge_Interval should be greater than, or equal to -1!");
}
@ -202,7 +202,10 @@ public class Config extends AutoUpdateConfigLoader {
// Check if there were any errors
if (noErrorsInConfig(reason)) {
mcMMO.p.debug("No errors found in config.yml!");
mcMMO.p.debug("No errors found in " + fileName + "!");
} else {
mcMMO.p.getLogger().warning("Errors were found in " + fileName + "! mcMMO was disabled!");
mcMMO.p.getServer().getPluginManager().disablePlugin(mcMMO.p);
}
}