Add hidden lag flag to abstract CheckConfig.

This commit is contained in:
asofold 2013-01-04 13:56:35 +01:00
parent 57ba5533aa
commit b85cd17688
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

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