public interface IPlayer extends ServerOperator, Metadatable
| Modifier and Type | Method and Description |
|---|---|
OptionalLong |
getFirstPlayed()
Returns the time this player first played on this server.
|
OptionalLong |
getLastPlayed()
Returns the time this player last joined in this server.
|
String |
getName()
Returns the name of this player.
|
Player |
getPlayer()
Returns a
Player object that this represents. |
Server |
getServer()
Returns the
Server object carrying this player. |
UUID |
getServerId() |
boolean |
hasPlayedBefore()
Checks if the player has played on this server before.
|
boolean |
isBanned()
Checks if this player is banned.
|
boolean |
isOnline()
Checks if this player is currently online.
|
boolean |
isWhitelisted()
Checks if this player is whitelisted.
|
void |
setBanned(boolean value)
Sets this player to be banned or to be pardoned.
|
void |
setWhitelisted(boolean value)
Adds or removes this player from the whitelist.
|
isOp, setOpgetMetadata, hasMetadata, removeMetadata, setMetadataboolean isOnline()
String getName()
UUID getServerId()
boolean isBanned()
void setBanned(boolean value)
value - true if bannedboolean isWhitelisted()
void setWhitelisted(boolean value)
value - true if whitelistedPlayer getPlayer()
Player object that this represents.
If the player is online, this will return that player. Otherwise,
it will return null.Server getServer()
Server object carrying this player.OptionalLong getFirstPlayed()
OptionalLong getLastPlayed()
boolean hasPlayedBefore()
Copyright © 2020. All rights reserved.