Class PlayerSpigot
java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.util.implementations.PlayerSpigot
- All Implemented Interfaces:
IMessageable,IPlayer,ICommandSender
Represents an implementation of
IPlayer for the Spigot platform.-
Nested Class Summary
Nested classes/interfaces inherited from interface nl.pim16aap2.animatedarchitecture.core.api.IMessageable
IMessageable.BlackHoleMessageable -
Field Summary
Fields inherited from interface nl.pim16aap2.animatedarchitecture.core.api.IMessageable
NULL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondefault StringasString()Gets the player as a String in the format '"playerName" (playerUUID)'.booleanorg.bukkit.entity.PlayerGets the bukkit player represented by thisIPlayerGets the current location of this player.getName()default longdefault PlayerDataGets a thePlayerDatathat represents this player.getUUID()inthashCode()hasPermission(String permission) Checks if this sender has a given permission.hasPermission(CommandDefinition command) Checks if this sender has a given command.booleanbooleanisOnline()booleanisOp()voidsendMessage(Text text) Sends a message to this object.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface nl.pim16aap2.animatedarchitecture.core.api.IMessageable
sendError, sendInfo, sendMessage, sendSuccess
-
Constructor Details
-
PlayerSpigot
public PlayerSpigot(org.bukkit.entity.Player spigotPlayer)
-
-
Method Details
-
getUUID
-
hasProtectionBypassPermission
public boolean hasProtectionBypassPermission() -
getLocation
Description copied from interface:IPlayerGets the current location of this player.- Specified by:
getLocationin interfaceIPlayer- Returns:
- The current location of this player.
-
hasPermission
Description copied from interface:ICommandSenderChecks if this sender has a given permission.- Specified by:
hasPermissionin interfaceICommandSender- Specified by:
hasPermissionin interfaceIPlayer- Parameters:
permission- The permission node to check.- Returns:
- True if the player has access to the provided permission, otherwise false.
-
hasPermission
Description copied from interface:ICommandSenderChecks if this sender has a given command.Both the user permission (See
CommandDefinition.getUserPermission()) and the admin permission (SeeCommandDefinition.getAdminPermission()) are checked.- Specified by:
hasPermissionin interfaceICommandSender- Specified by:
hasPermissionin interfaceIPlayer- Parameters:
command- TheCommandDefinitionof a command to check.- Returns:
- A
PermissionsStatusthat is true if the player has access to the provided permissions, otherwise false for the user and the admin permission nodes respectively.
-
isOnline
public boolean isOnline() -
getLimit
-
isOp
public boolean isOp() -
getName
-
sendMessage
Description copied from interface:IMessageableSends a message to this object.- Specified by:
sendMessagein interfaceIMessageable- Parameters:
text- The message to send. This may or may not contain formatting.
-
getBukkitPlayer
public org.bukkit.entity.Player getBukkitPlayer()Gets the bukkit player represented by thisIPlayer- Returns:
- The Bukkit player.
-
toString
-
equals
-
hashCode
public int hashCode() -
asString
Gets the player as a String in the format '"playerName" (playerUUID)'.- Returns:
- The player as a String.
-
getPlayerData
Gets a thePlayerDatathat represents this player. This may or may not be a new object.- Returns:
- The
PlayerDatathat represents this player.
-
getPermissionsFlag
default long getPermissionsFlag()
-