This commit is contained in:
Jesse Boyd 2016-09-30 15:29:50 +10:00
parent 6074fc8033
commit f1d581a8d8

View File

@ -31,6 +31,9 @@ public class Reload extends SubCommand {
@Override @Override
public void run(PlotArea area) { public void run(PlotArea area) {
ConfigurationSection worldSection = PS.get().worlds.getConfigurationSection("worlds." + area.worldname); ConfigurationSection worldSection = PS.get().worlds.getConfigurationSection("worlds." + area.worldname);
if (worldSection == null) {
worldSection = PS.get().worlds.createSection("worlds." + area.worldname);
}
if (area.TYPE != 2 || !worldSection.contains("areas")) { if (area.TYPE != 2 || !worldSection.contains("areas")) {
area.saveConfiguration(worldSection); area.saveConfiguration(worldSection);
area.loadDefaultConfiguration(worldSection); area.loadDefaultConfiguration(worldSection);