Debugging is important to me, load the old debugging value.

This commit is contained in:
graywolf336 2014-03-14 15:35:50 -05:00
parent b2a8e6c89c
commit 737a7e35e2
2 changed files with 8 additions and 0 deletions

View File

@ -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;

View File

@ -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++;
}