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
Description:
Gets the username of the player.
Returns:
The player's username as a String
.
profile
Description:
Gets the profile information of the player.
Returns:
The player's profile as a String
.
entityId
Description:
Gets the entity ID of the player.
Returns:
The player's entity ID as an int
.
ticksExisted
Description:
Gets the number of ticks the player has existed in the server.
Returns:
The number of ticks as an int
.
bedrock
Description:
Determines if the player is using a Bedrock client.
Returns:
true
if the player is using a Bedrock client, false
otherwise.
uuid
Description:
Gets the unique identifier of the player.
Returns:
The player's UUID.
clientVersion
Description:
Gets information about the player's client version.
Returns:
A ClientVersion object containing details about the player's client.
connection
Description:
Gets information about the player's connection.
Returns:
A PlayerConnection object containing details about the player's connection.
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
Description:
Exempts the player from anticheat checks.
kick
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
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
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
Description:
Gets the alert settings for detections related to this player.
Returns:
The player's detection AlertSettings.
mitigationAlertSettings
Description:
Gets the alert settings for mitigations related to this player.
Returns:
The player's mitigation AlertSettings.