mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-10-31 07:40:16 +01:00
Add hidden lag flag to abstract CheckConfig.
This commit is contained in:
parent
57ba5533aa
commit
b85cd17688
@ -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
|
||||
|
@ -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";
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user