Interface BukkitPlayer
- All Superinterfaces:
GenericPlayer
GenericPlayer instance for the Paper server implementation of AdvancedServerList.
This interface includes a OfflinePlayer instance obtained from the server the plugin
runs on alongside some getters to get if the player has played on the server before,
is banned or is whitelisted. These options actually require a proper
OfflinePlayer instance to be present or will otherwise default to false
.
This class is useful for cases where you want to use the OfflinePlayer. Simply cast the GenericPlayer instance to a BukkitPlayer (Granted that it actually is an instance of it to begin with).
-
Method Summary
Modifier and TypeMethodDescriptionGives the OfflinePlayer embedded in this BukkitPlayer instance.boolean
Returns whether this player has played on the Server before.boolean
isBanned()
Returns whether this player is banned on the server.boolean
Returns whether this player is whitelisted on the server.Methods inherited from interface ch.andre601.advancedserverlist.api.objects.GenericPlayer
getName, getProtocol, getUUID
-
Method Details
-
getPlayer
OfflinePlayer getPlayer()Gives the OfflinePlayer embedded in this BukkitPlayer instance.- Returns:
- OfflinePlayer instance.
-
hasPlayedBefore
boolean hasPlayedBefore()Returns whether this player has played on the Server before.
The returned boolean may be inaccurate if AdvancedServerList was unable to obtain a valid OfflinePlayer instance.
- Returns:
- Boolean indicating whether this player has played on this Server before.
-
isBanned
boolean isBanned()Returns whether this player is banned on the server.
The returned boolean may be inaccurate if AdvancedServerList was unable to obtain a valid OfflinePlayer instance.
- Returns:
- Boolean indicating whether this player was banned from the server.
-
isWhitelisted
boolean isWhitelisted()Returns whether this player is whitelisted on the server.
The returned boolean may be inaccurate if AdvancedServerList was unable to obtain a valid OfflinePlayer instance.
- Returns:
- Boolean indicating whether this player was banned from the server.
-