From af4c9b94f67e4e16a46430c7679cf80010b4f5a6 Mon Sep 17 00:00:00 2001 From: asofold Date: Mon, 12 Aug 2013 22:20:44 +0200 Subject: [PATCH] Move managelisteners to the compatibility section. --- .../fr/neatmonster/nocheatplus/config/ConfPaths.java | 9 ++++++--- .../fr/neatmonster/nocheatplus/config/DefaultConfig.java | 6 ++++-- .../java/fr/neatmonster/nocheatplus/NoCheatPlus.java | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/ConfPaths.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/ConfPaths.java index c0da5f23..411b4cc5 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/ConfPaths.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/ConfPaths.java @@ -70,10 +70,10 @@ public abstract class ConfPaths { */ @GlobalConfig private static final String MISCELLANEOUS = "miscellaneous."; - public static final String MISCELLANEOUS_CHECKFORUPDATES = MISCELLANEOUS + "checkforupdates"; - public static final String MISCELLANEOUS_UPDATETIMEOUT = MISCELLANEOUS + "updatetimeout"; + //public static final String MISCELLANEOUS_CHECKFORUPDATES = MISCELLANEOUS + "checkforupdates"; + //public static final String MISCELLANEOUS_UPDATETIMEOUT = MISCELLANEOUS + "updatetimeout"; public static final String MISCELLANEOUS_REPORTTOMETRICS = MISCELLANEOUS + "reporttometrics"; - public static final String MISCELLANEOUS_MANAGELISTENERS = MISCELLANEOUS + "managelisteners"; + /** TEMP: hidden flag to disable all lag adaption with one flag. */ public static final String MISCELLANEOUS_LAG = MISCELLANEOUS + "lag"; @@ -653,6 +653,7 @@ public abstract class ConfPaths { // Compatibility section (possibly temporary). @GlobalConfig public static final String COMPATIBILITY = "compatibility."; + public static final String COMPATIBILITY_MANAGELISTENERS = COMPATIBILITY + "managelisteners"; public static final String COMPATIBILITY_BUKKITONLY = COMPATIBILITY + "bukkitapionly"; public static final String COMPATIBILITY_BLOCKS = COMPATIBILITY + "blocks."; @@ -677,4 +678,6 @@ public abstract class ConfPaths { public static final String PROTECT_PLUGINS_HIDE_MSG_NOPERMISSION = "protection.plugins.hide.messages.nopermission"; @Moved(newPath = PROTECT_COMMANDS_CONSOLEONLY_ACTIVE) public static final String MISCELLANEOUS_OPINCONSOLEONLY = "miscellaneous.opinconsoleonly"; + @Moved(newPath = COMPATIBILITY_MANAGELISTENERS) + public static final String MISCELLANEOUS_MANAGELISTENERS = "miscellaneous.managelisteners"; } diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java index badfd278..28d21e6d 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java @@ -72,7 +72,6 @@ public class DefaultConfig extends ConfigFile { * d8b Y8b Y8b 888 Y88D Y888 , 888 , 888 888 ,ee 888 888 888 888 , Y888 888P Y888 888P Y88D * d888b Y8b Y8b 888 d,dP "88,e8' "YeeP" 888 888 "88 888 888 888 "YeeP" "88 88" "88 88" d,dP */ - set(ConfPaths.MISCELLANEOUS_MANAGELISTENERS, false); // set(ConfPaths.MISCELLANEOUS_CHECKFORUPDATES, true); set(ConfPaths.MISCELLANEOUS_REPORTTOMETRICS, true); @@ -488,6 +487,7 @@ public class DefaultConfig extends ConfigFile { * , 88P * "8",P" */ + // TODO: An extra file might suit these. final String start = "[player] failed [check]: "; final String end = ". VL [violations]."; final String tell = "ncp tell [player] "; @@ -553,7 +553,9 @@ public class DefaultConfig extends ConfigFile { set(ConfPaths.STRINGS + ".tellchatnormal", tell + "&cNCP: &eToo many messages, slow down..."); set(ConfPaths.STRINGS + ".tempkick1", "ncp tempkick [player] 1 Wait a minute!"); set(ConfPaths.STRINGS + ".tempkick5", "ncp tempkick [player] 5 You have five minutes to think about it!"); - + + // Compatibility settings. + set(ConfPaths.COMPATIBILITY_MANAGELISTENERS, false); set(ConfPaths.COMPATIBILITY_BUKKITONLY, false); set(ConfPaths.COMPATIBILITY_BLOCKS + ConfPaths.SUB_IGNOREPASSABLE, Arrays.asList( Material.WOODEN_DOOR.name(), Material.IRON_DOOR_BLOCK.name(), diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/NoCheatPlus.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/NoCheatPlus.java index 9f5bc454..f656dbb7 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/NoCheatPlus.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/NoCheatPlus.java @@ -727,7 +727,7 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI { TickTask.setLocked(false); // List the events listeners and register. - manageListeners = config.getBoolean(ConfPaths.MISCELLANEOUS_MANAGELISTENERS); + manageListeners = config.getBoolean(ConfPaths.COMPATIBILITY_MANAGELISTENERS); if (manageListeners) { listenerManager.setRegisterDirectly(true); listenerManager.registerAllWithBukkit();