mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-19 16:59:37 +01:00
Cleanup.
This commit is contained in:
parent
66ad909908
commit
0fe90df01e
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user