Players

This guide will show you how to retrieve a player using the Java SDK.

You can fetch an instance of AnalysePlayer for an online by using the getPlayer method of the Platform interface, which takes a UUID and returns an AnalysePlayer.

Available Methods

getName()

Returns the player's name.

getUniqueId()

Returns the player's unique ID.

getJoinedAt()

Returns the date the player joined the server.

getQuitAt()

Returns the date the player quit the server.

getFirstJoinedAt()

Returns the date the player first joined the server.

getIpAddress()

Returns the players IP address.

getEvents()

Returns the players triggered events.

getDomain()

Returns the domain that the player joined from.

getCountry()

Returns the players 2-digit country code.

getType()

Returns the platform type of the player (JAVA or BEDROCK).

track(PlayerEvent)

Tracks a player event.

setType(PlayerType)

Example Usage

AnalysePlayer analysePlayer = platform.getPlayer(UUID.fromString("00000000-0000-0000-0000-000000000000"));

if (analysePlayer != null) {
    // Do something with the player.
}

Last updated