Add developer mode, other small fixes

This commit is contained in:
h31ix committed 2013-03-28 22:21:21 -04:00
1 parent cb1959d2c0
commit 8d13e964ae
6 files changed
+39 -17

No files matched your search

@@ -51,6 +51,7 @@ public class Anticheat extends JavaPlugin {
private static boolean update = false;
private static Configuration config;
private static boolean verbose;
private static boolean developer;
private static Metrics metrics;
private static final long XRAY_TIME = 1200;
@@ -273,4 +274,22 @@ public class Anticheat extends JavaPlugin {
config = null;
metrics = null;
}
public static boolean developerMode() {
return developer;
}
public static void setDeveloperMode(boolean b) {
developer = b;
}
public static void debugLog(final String string) {
Bukkit.getScheduler().runTask(getPlugin(), new Runnable() {
public void run() {
if(developer) {
manager.log("[DEBUG] " + string);
}
}
});
}
}