Polar Help

User Interface

Introduction

The User interface represents a player in Polar and provides methods to access player information and perform player-related actions.

Methods

username

String username();

Description:

Gets the username of the player.

Returns:

The player's username as a String.

profile

String profile();

Description:

Gets the profile information of the player.

Returns:

The player's profile as a String.

entityId

int entityId();

Description:

Gets the entity ID of the player.

Returns:

The player's entity ID as an int.

ticksExisted

int ticksExisted();

Description:

Gets the number of ticks the player has existed in the server.

Returns:

The number of ticks as an int.

bedrock

boolean bedrock();

Description:

Determines if the player is using a Bedrock client.

Returns:

true if the player is using a Bedrock client, false otherwise.

uuid

UUID uuid();

Description:

Gets the unique identifier of the player.

Returns:

The player's UUID.

clientVersion

ClientVersion clientVersion();

Description:

Gets information about the player's client version.

Returns:

A ClientVersion object containing details about the player's client.

connection

PlayerConnection connection();

Description:

Gets information about the player's connection.

Returns:

A PlayerConnection object containing details about the player's connection.

bukkitPlayer

Optional<Player> bukkitPlayer();

Description:

Gets the associated Bukkit player instance, if available.

Returns:

An Optional containing the Bukkit Player object, or an empty Optional if not available.

exempt

void exempt();

Description:

Exempts the player from anticheat checks.

kick

boolean kick(String reason);

Description:

Kicks the player from the server with the specified reason.

Parameters:

  • reason - The reason for kicking the player.

Returns:

true if the kick was successful, false otherwise.

issueKickPunishment

boolean issueKickPunishment(String reason);

Description:

Issues a kick punishment to the player with the specified reason.

Parameters:

  • reason - The reason for the punishment.

Returns:

true if the punishment was successful, false otherwise.

issueBanPunishment

boolean issueBanPunishment(String reason);

Description:

Issues a ban punishment to the player with the specified reason.

Parameters:

  • reason - The reason for the punishment.

Returns:

true if the punishment was successful, false otherwise.

detectionAlertSettings

AlertSettings detectionAlertSettings();

Description:

Gets the alert settings for detections related to this player.

Returns:

The player's detection AlertSettings.

mitigationAlertSettings

AlertSettings mitigationAlertSettings();

Description:

Gets the alert settings for mitigations related to this player.

Returns:

The player's mitigation AlertSettings.