PolarDocs Client Area

ConfigOverride Interface

Introduction#

The ConfigOverride interface allows per-player overrides of options that are otherwise set globally in the Configuration. It is obtained through User#configOverride().

Every option has a getter and a setter with the same name. Overrides apply only to the user they were set on and are discarded when the player disconnects.

Methods#

enforceLatency#

java
boolean enforceLatency();
void enforceLatency(boolean enforceLatency);

Whether the Enforce Latency security measure is applied to the player.

unstableConnectionLimit#

java
long unstableConnectionLimit();
void unstableConnectionLimit(int unstableConnectionLimit);

The Unstable Connection Limit for the player: the average latency above which they may be kicked.

detectAndPreventBacktrack#

java
boolean detectAndPreventBacktrack();
void detectAndPreventBacktrack(boolean detectAndPreventBacktrack);

Whether backtrack cheats are detected and prevented for the player.

timedOutLimit#

java
long timedOutLimit();
void timedOutLimit(int timedOutLimit);

The Timeout Limit for the player, in seconds. The player is kicked if they do not respond for this long.

movementTolerance#

java
ToleranceLevel movementTolerance();
void movementTolerance(ToleranceLevel level);

The Movement Tolerance for the player, as a ToleranceLevel.

blinkPreventionTolerance#

java
ToleranceLevel blinkPreventionTolerance();
void blinkPreventionTolerance(ToleranceLevel level);

The tolerance applied to blink prevention for the player, as a ToleranceLevel.

preventAirPlace#

java
boolean preventAirPlace();
void preventAirPlace(boolean preventAirPlace);

Whether Prevent Air Place is applied to the player.

preventBreakingSurrounded#

java
boolean preventBreakingSurrounded();
void preventBreakingSurrounded(boolean preventBreakingSurrounded);

Whether the player is prevented from breaking blocks that are fully surrounded by other blocks.

preventPhase#

java
boolean preventPhase();
void preventPhase(boolean preventPhase);

Whether Prevent Phase is applied to the player.

preventNoSlowdown#

java
boolean preventNoSlowdown();
void preventNoSlowdown(boolean preventNoSlowdown);

Whether Prevent No Slowdown is applied to the player.

healthFilter#

java
boolean healthFilter();
void healthFilter(boolean healthFilter);

Whether the player's health is hidden from other players.

absorptionFilter#

java
boolean absorptionFilter();
void absorptionFilter(boolean absorptionFilter);

Whether the player's absorption is hidden from other players.

playerGroundFilter#

java
boolean playerGroundFilter();
void playerGroundFilter(boolean playerGroundFilter);

Whether the player's on-ground state is hidden from other players.

Example#

java
api.userRepository().queryUserByUuid(uuid).ifPresent(user -> {
    ConfigOverride override = user.configOverride();
    override.movementTolerance(ToleranceLevel.LENIENT);
    override.preventPhase(false);
});