Debugging is important to me, load the old debugging value.
This commit is contained in:
		| @@ -207,6 +207,11 @@ public class JailMain extends JavaPlugin { | |||||||
| 		return this.sbm; | 		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. */ | 	/** Returns if the plugin is in debug state or not. */ | ||||||
| 	public boolean inDebug() { | 	public boolean inDebug() { | ||||||
| 		return this.debug; | 		return this.debug; | ||||||
|   | |||||||
| @@ -80,6 +80,9 @@ public class LegacyManager { | |||||||
| 				case Debug: | 				case Debug: | ||||||
| 					if(global.contains(s.getString())) { | 					if(global.contains(s.getString())) { | ||||||
| 						c.set(Settings.DEBUG.getPath(), OldSettings.getGlobalBoolean(global, s)); | 						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()); | 						pl.debug(Settings.DEBUG.getPath() + " <-- " + s.getString()); | ||||||
| 						count++; | 						count++; | ||||||
| 					} | 					} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 graywolf336
					graywolf336