mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-02-03 13:21:23 +01:00
Add configurability to enforcing the players location.
This commit is contained in:
parent
2b2ace4a4b
commit
ce2d0dbc3c
@ -140,7 +140,7 @@ public class MovingConfig extends ACheckConfig {
|
||||
public final boolean vehicleEnforceLocation;
|
||||
public final boolean vehiclePreventDestroyOwn;
|
||||
|
||||
public final boolean enforceLocation = true; // TODO: Configurable + name.
|
||||
public final boolean enforceLocation;
|
||||
|
||||
/**
|
||||
* Instantiates a new moving configuration.
|
||||
@ -219,6 +219,8 @@ public class MovingConfig extends ACheckConfig {
|
||||
|
||||
vehicleEnforceLocation = config.getBoolean(ConfPaths.MOVING_VEHICLES_ENFORCELOCATION);
|
||||
vehiclePreventDestroyOwn = config.getBoolean(ConfPaths.MOVING_VEHICLES_PREVENTDESTROYOWN);
|
||||
|
||||
enforceLocation = config.getBoolean(ConfPaths.MOVING_ENFORCELOCATION);
|
||||
}
|
||||
|
||||
|
||||
|
@ -567,11 +567,13 @@ public abstract class ConfPaths {
|
||||
public static final String MOVING_SPRINTINGGRACE = MOVING + "sprintinggrace";
|
||||
public static final String MOVING_ASSUMESPRINT = MOVING + "assumesprint";
|
||||
public static final String MOVING_SPEEDGRACE = MOVING + "speedgrace";
|
||||
public static final String MOVING_ENFORCELOCATION = MOVING + "enforcelocation";
|
||||
|
||||
private static final String MOVING_VEHICLES = MOVING + "vehicles.";
|
||||
public static final String MOVING_VEHICLES_ENFORCELOCATION = MOVING_VEHICLES + "enforcelocation";
|
||||
public static final String MOVING_VEHICLES_PREVENTDESTROYOWN = MOVING_VEHICLES + "preventdestroyown";
|
||||
|
||||
|
||||
public static final String STRINGS = "strings";
|
||||
|
||||
// Compatibility section (possibly temporary).
|
||||
|
@ -409,6 +409,7 @@ public class DefaultConfig extends ConfigFile {
|
||||
set(ConfPaths.MOVING_SPRINTINGGRACE, 2.0);
|
||||
set(ConfPaths.MOVING_ASSUMESPRINT, true);
|
||||
set(ConfPaths.MOVING_SPEEDGRACE, 4.0);
|
||||
set(ConfPaths.MOVING_ENFORCELOCATION, true);
|
||||
|
||||
// TODO: An extra file might suit these.
|
||||
final String start = "[player] failed [check]: ";
|
||||
|
Loading…
Reference in New Issue
Block a user