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
@ -18,30 +18,39 @@ public class RepairConfigManager {
|
||||
File dataFolder = plugin.getDataFolder();
|
||||
|
||||
File vanilla = new File(dataFolder, "repair.vanilla.yml");
|
||||
if(!vanilla.exists()) {
|
||||
if (!vanilla.exists()) {
|
||||
plugin.saveResource("repair.vanilla.yml", false);
|
||||
}
|
||||
|
||||
for(String location : dataFolder.list()) {
|
||||
if(!pattern.matcher(location).matches()) continue;
|
||||
for (String location : dataFolder.list()) {
|
||||
if (!pattern.matcher(location).matches()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
plugin.getLogger().info("Loading " + location + " repair config file...");
|
||||
|
||||
File file = new File(dataFolder, location);
|
||||
if(file.isDirectory()) continue;
|
||||
|
||||
if (file.isDirectory()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
RepairConfig rConfig = new RepairConfig(plugin, location);
|
||||
rConfig.load();
|
||||
|
||||
List<Repairable> rConfigRepairables = rConfig.getLoadedRepairables();
|
||||
if(rConfigRepairables != null) {
|
||||
|
||||
if (rConfigRepairables != null) {
|
||||
repairables.addAll(rConfigRepairables);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<Repairable> getLoadedRepairables() {
|
||||
if(repairables == null) return new ArrayList<Repairable>();
|
||||
if (repairables == null) {
|
||||
return new ArrayList<Repairable>();
|
||||
}
|
||||
|
||||
return repairables;
|
||||
}
|
||||
}
|
||||
|
@ -161,14 +161,15 @@ public class mcMMO extends JavaPlugin {
|
||||
|
||||
Graph graph = metrics.createGraph("Percentage of servers using timings");
|
||||
|
||||
if(pm.useTimings()) {
|
||||
if (pm.useTimings()) {
|
||||
graph.addPlotter(new Metrics.Plotter("Enabled") {
|
||||
@Override
|
||||
public int getValue() {
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
graph.addPlotter(new Metrics.Plotter("Disabled") {
|
||||
@Override
|
||||
public int getValue() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user