This commit is contained in:
GJ 2012-05-23 11:16:23 -04:00
parent 66ad909908
commit 0fe90df01e
2 changed files with 18 additions and 8 deletions

View File

@ -23,17 +23,23 @@ public class RepairConfigManager {
} }
for (String location : dataFolder.list()) { for (String location : dataFolder.list()) {
if(!pattern.matcher(location).matches()) continue; if (!pattern.matcher(location).matches()) {
continue;
}
plugin.getLogger().info("Loading " + location + " repair config file..."); plugin.getLogger().info("Loading " + location + " repair config file...");
File file = new File(dataFolder, location); File file = new File(dataFolder, location);
if(file.isDirectory()) continue;
if (file.isDirectory()) {
continue;
}
RepairConfig rConfig = new RepairConfig(plugin, location); RepairConfig rConfig = new RepairConfig(plugin, location);
rConfig.load(); rConfig.load();
List<Repairable> rConfigRepairables = rConfig.getLoadedRepairables(); List<Repairable> rConfigRepairables = rConfig.getLoadedRepairables();
if (rConfigRepairables != null) { if (rConfigRepairables != null) {
repairables.addAll(rConfigRepairables); repairables.addAll(rConfigRepairables);
} }
@ -41,7 +47,10 @@ public class RepairConfigManager {
} }
public List<Repairable> getLoadedRepairables() { public List<Repairable> getLoadedRepairables() {
if(repairables == null) return new ArrayList<Repairable>(); if (repairables == null) {
return new ArrayList<Repairable>();
}
return repairables; return repairables;
} }
} }

View File

@ -168,7 +168,8 @@ public class mcMMO extends JavaPlugin {
return 1; return 1;
} }
}); });
} else { }
else {
graph.addPlotter(new Metrics.Plotter("Disabled") { graph.addPlotter(new Metrics.Plotter("Disabled") {
@Override @Override
public int getValue() { public int getValue() {