From 737a7e35e2f625ef1b1574184c10ea5478f99e66 Mon Sep 17 00:00:00 2001 From: graywolf336 Date: Fri, 14 Mar 2014 15:35:50 -0500 Subject: [PATCH] Debugging is important to me, load the old debugging value. --- src/main/java/com/graywolf336/jail/JailMain.java | 5 +++++ src/main/java/com/graywolf336/jail/legacy/LegacyManager.java | 3 +++ 2 files changed, 8 insertions(+) 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++; }