Class WrappedOfflinePlayer
java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.util.implementations.WrappedOfflinePlayer
- All Implemented Interfaces:
IMessageable, IPlayer, ICommandSender
-
Constructor Summary
ConstructorsConstructorDescriptionWrappedOfflinePlayer(PlayerData playerData) WrappedOfflinePlayer(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()longCreates a newPersonalizedLocalizerusing the localizer and locale of this messageable.Gets the text factory of this messageable.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()Returns whether this player is online.booleanisOp()limits()name()voidsendMessage(Text text) Deprecated.toString()uuid()Methods inherited from interface IMessageable
newText, sendError, sendInfo, sendMessage, sendSuccessMethods inherited from interface IPlayer
formatCommand, getPlayer, isPlayer
-
Constructor Details
-
WrappedOfflinePlayer
-
WrappedOfflinePlayer
-
-
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.
-
getTextFactory
Description copied from interface:IMessageableGets the text factory of this messageable.- Specified by:
getTextFactoryin interfaceIMessageable- Returns:
- The text factory of this messageable.
-
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
-
getBukkitPlayer
public org.bukkit.OfflinePlayer getBukkitPlayer()Gets the bukkitOfflinePlayerrepresented by thisIPlayerif it exists.- Returns:
- The Bukkit player.
-
toString
-
equals
-
hashCode
-
getLocation
Description copied from interface:IPlayerGets the current location of this player.- Specified by:
getLocationin interfaceIPlayer- Returns:
- The current location of this player.
-
getPersonalizedLocalizer
Description copied from interface:IMessageableCreates a newPersonalizedLocalizerusing the localizer and locale of this messageable.- Specified by:
getPersonalizedLocalizerin interfaceIMessageable- Returns:
- A new
PersonalizedLocalizerobject.
-
getLimit
-
getPlayerData
-
getName
-
getUUID
-
hasProtectionBypassPermission
public boolean hasProtectionBypassPermission() -
uuid
-
name
-
limits
-
isOp
public boolean isOp() -
asString
-
getPermissionsFlag
public long getPermissionsFlag()
-