diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/access/ACheckConfig.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/access/ACheckConfig.java index 41d5ee1d..527a296f 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/access/ACheckConfig.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/access/ACheckConfig.java @@ -1,5 +1,6 @@ package fr.neatmonster.nocheatplus.checks.access; +import fr.neatmonster.nocheatplus.config.ConfPaths; import fr.neatmonster.nocheatplus.config.ConfigFile; @@ -13,13 +14,17 @@ public abstract class ACheckConfig implements ICheckConfig { /** For on the fly debug setting. */ public boolean debug = false; + /** For adaption to server side lag. */ + public final boolean lag; + /** * * @param config * @param pathPrefix Path prefix for the check section (example for use: prefix+"debug"). */ public ACheckConfig(final ConfigFile config, final String pathPrefix){ - debug = config.getBoolean(pathPrefix + "debug", false); + debug = config.getBoolean(pathPrefix + ConfPaths.SUB_DEBUG, false); + lag = config.getBoolean(pathPrefix + ConfPaths.SUB_LAG, true); } @Override diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/config/ConfPaths.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/config/ConfPaths.java index abb776aa..e0c048b5 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/config/ConfPaths.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/config/ConfPaths.java @@ -515,6 +515,8 @@ public abstract class ConfPaths { public static final String COMPATIBILITY_BLOCKS = COMPATIBILITY + "blocks."; // Sub paths that are used with different path prefixes potentially. + public static final String SUB_DEBUG = "debug"; public static final String SUB_IGNOREPASSABLE = "ignorepassable"; + public static final String SUB_LAG = "lag"; }