diff --git a/src/main/java/com/graywolf336/jail/JailMain.java b/src/main/java/com/graywolf336/jail/JailMain.java index 47bb4f6..2cf39c6 100644 --- a/src/main/java/com/graywolf336/jail/JailMain.java +++ b/src/main/java/com/graywolf336/jail/JailMain.java @@ -207,6 +207,11 @@ public class JailMain extends JavaPlugin { return this.sbm; } + /** Sets whether the plugin is in debugging or not. */ + public void setDebugging(boolean debug) { + this.debug = debug; + } + /** Returns if the plugin is in debug state or not. */ public boolean inDebug() { return this.debug; diff --git a/src/main/java/com/graywolf336/jail/legacy/LegacyManager.java b/src/main/java/com/graywolf336/jail/legacy/LegacyManager.java index 3ad4c44..db45c9e 100644 --- a/src/main/java/com/graywolf336/jail/legacy/LegacyManager.java +++ b/src/main/java/com/graywolf336/jail/legacy/LegacyManager.java @@ -80,6 +80,9 @@ public class LegacyManager { case Debug: if(global.contains(s.getString())) { c.set(Settings.DEBUG.getPath(), OldSettings.getGlobalBoolean(global, s)); + //Only set it true if the old config had true, this way we can still hold the debuggin over + //if the old config had it set to false but the new one has it set to true (until a restart/reload) + if(c.getBoolean(Settings.DEBUG.getPath())) pl.setDebugging(true); pl.debug(Settings.DEBUG.getPath() + " <-- " + s.getString()); count++; }