Polar Help

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

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

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

unstableConnectionLimit

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

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

detectAndPreventBacktrack

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

Whether backtrack cheats are detected and prevented for the player.

timedOutLimit

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

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

The Movement Tolerance for the player, as a ToleranceLevel.

blinkPreventionTolerance

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

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

preventAirPlace

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

Whether Prevent Air Place is applied to the player.

preventBreakingSurrounded

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

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

preventPhase

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

Whether Prevent Phase is applied to the player.

preventNoSlowdown

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

Whether Prevent No Slowdown is applied to the player.

healthFilter

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

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

absorptionFilter

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

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

playerGroundFilter

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

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

Example

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