Interface OfflinePlayers
public interface OfflinePlayers
-
Method Summary
Modifier and TypeMethodDescriptionLooks up an identity by name without contacting storage or the network.Looks up an identity without contacting storage or the network.booleanisOperator(UUID uuid) Checks whether an identity holds operator status.known()Gets every identity currently held in the cache.Resolves an identity by name, consulting the profile source when the name is not already known.lookup(Collection<String> names) Resolves several identities by name.Gets the handle for a connected player.Gets the handle for an identity, whether or not the server has ever observed it.Gets the connected player behind an identity.Produces an updated handle for an identity, consulting the profile source when the locally held record has expired.voidsetOperator(UUID uuid, boolean operator) Sets the operator status of an identity, whether or not it is connected.Reads the saved state of an identity, or its current state when it is connected.
-
Method Details
-
of
Gets the handle for an identity, whether or not the server has ever observed it.- Parameters:
uuid- the player identity- Returns:
- the handle, whose
OfflinePlayer.hasPlayedBefore()reports whether anything is known about it - Since:
- 0.1.0
-
of
Gets the handle for a connected player.- Parameters:
player- the connected player- Returns:
- the handle for that player's identity
- Since:
- 0.1.0
-
cached
Looks up an identity by name without contacting storage or the network.- Parameters:
name- the player name- Returns:
- the handle, or empty if the name is not currently known
- Since:
- 0.1.0
-
cached
Looks up an identity without contacting storage or the network.Unlike
of(UUID), this reports whether the identity is known.- Parameters:
uuid- the player identity- Returns:
- the handle, or empty if the identity is not currently known
- Since:
- 0.1.0
-
lookup
Resolves an identity by name, consulting the profile source when the name is not already known.- Parameters:
name- the player name- Returns:
- a future completing with the handle, or with an empty result if no such player exists
- Since:
- 0.1.0
-
lookup
Resolves several identities by name.- Parameters:
names- the player names; duplicates and case differences are collapsed- Returns:
- a future completing with the resolved handles, keyed by the requested name; names that do not resolve are absent from the result
- Since:
- 0.1.0
-
refresh
Produces an updated handle for an identity, consulting the profile source when the locally held record has expired.- Parameters:
uuid- the player identity- Returns:
- a future completing with an updated handle, carrying the previously known name if the lookup does not succeed
- Since:
- 0.1.0
-
online
-
isOperator
Checks whether an identity holds operator status.- Parameters:
uuid- the player identity- Returns:
trueif that identity is an operator- Since:
- 0.1.0
-
setOperator
Sets the operator status of an identity, whether or not it is connected.- Parameters:
uuid- the player identityoperator- the new operator status- Since:
- 0.1.0
-
snapshot
Reads the saved state of an identity, or its current state when it is connected.- Parameters:
uuid- the player identity- Returns:
- a future completing with the state, or with an empty result if nothing has ever been saved for that identity
- Since:
- 0.1.0
-
known
Gets every identity currently held in the cache.- Returns:
- an immutable snapshot of the known identities
- Since:
- 0.1.0
-