Class OfflinePlayerSpigot
java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.util.implementations.OfflinePlayerSpigot
- 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
ConstructorsConstructorDescriptionOfflinePlayerSpigot(PlayerData playerData) OfflinePlayerSpigot(PlayerData playerData, org.bukkit.OfflinePlayer spigotPlayer) -
Method Summary
Modifier and TypeMethodDescriptionasString()booleanorg.bukkit.OfflinePlayerGets the bukkitOfflinePlayerrepresented by thisIPlayerif it exists.Gets the current location of this player.getName()longgetUUID()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()limits()name()voidsendMessage(Text text) Deprecated.toString()uuid()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
-
OfflinePlayerSpigot
-
OfflinePlayerSpigot
-
-
Method Details
-
sendMessage
Deprecated.Calling this method has no effect, as there is no player to send the message to.- Specified by:
sendMessagein interfaceIMessageable- Parameters:
text- The message to send. This may or may not contain formatting.
-
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() -
getBukkitPlayer
public org.bukkit.OfflinePlayer getBukkitPlayer()Gets the bukkitOfflinePlayerrepresented by thisIPlayerif it exists.- Returns:
- The Bukkit player.
-
toString
-
equals
-
hashCode
public int hashCode() -
getLocation
Description copied from interface:IPlayerGets the current location of this player.- Specified by:
getLocationin interfaceIPlayer- Returns:
- The current location of this player.
-
getLimit
-
getPlayerData
-
getName
-
getUUID
-
hasProtectionBypassPermission
public boolean hasProtectionBypassPermission() -
uuid
-
name
-
limits
-
isOp
public boolean isOp() -
asString
-
getPermissionsFlag
public long getPermissionsFlag()
-