Move managelisteners to the compatibility section.

This commit is contained in:
asofold 2013-08-12 22:20:44 +02:00
parent d202d73cab
commit af4c9b94f6
3 changed files with 11 additions and 6 deletions

View File

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

View File

@ -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(),

View File

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