From 66e12e2a0ca2e56a353ac94913291fe25bb42796 Mon Sep 17 00:00:00 2001 From: SirYwell Date: Tue, 8 Jun 2021 12:10:21 +0200 Subject: [PATCH] Make world settings reloadable --- .../src/main/java/com/plotsquared/core/command/Reload.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Reload.java b/Core/src/main/java/com/plotsquared/core/command/Reload.java index f74d92f53..8b2ead60c 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Reload.java +++ b/Core/src/main/java/com/plotsquared/core/command/Reload.java @@ -25,6 +25,7 @@ */ package com.plotsquared.core.command; +import com.google.inject.Guice; import com.google.inject.Inject; import com.plotsquared.core.PlotSquared; import com.plotsquared.core.configuration.ConfigurationSection; @@ -49,8 +50,8 @@ import java.util.Objects; public class Reload extends SubCommand { private final PlotAreaManager plotAreaManager; - private final YamlConfiguration worldConfiguration; - private final File worldFile; + private YamlConfiguration worldConfiguration; + private File worldFile; @Inject public Reload( @@ -69,6 +70,8 @@ public class Reload extends SubCommand { // The following won't affect world generation, as that has to be // loaded during startup unfortunately. PlotSquared.get().setupConfigs(); + this.worldConfiguration = PlotSquared.get().getWorldConfiguration(); + this.worldFile = PlotSquared.get().getWorldsFile(); PlotSquared.get().loadCaptionMap(); this.plotAreaManager.forEachPlotArea(area -> { ConfigurationSection worldSection = this.worldConfiguration