Package wtf.choco.veinminer.platform
Interface PlatformPlayer
- All Superinterfaces:
PlatformCommandSender
- All Known Implementing Classes:
BukkitPlatformPlayer
Represents a platform-independent player.
-
Method Summary
Modifier and TypeMethodDescription@NotNull GameMode
Get theGameMode
of this player.@NotNull ItemStack
Get theItemStack
in the player's main hand.@NotNull RayTraceResult
getTargetBlock
(int distance) Get the block the player is looking at within the given distance.@NotNull UUID
Get theUUID
of this player.@NotNull BlockAccessor
getWorld()
Get theworld
in which this player currently resides.boolean
isOnline()
Check whether or not this player is online the server.boolean
Check whether or not this player is sneaking.void
Kick this player from the server with the given disconnect message.void
sendPluginMessage
(@NotNull NamespacedKey channel, byte[] message) Send a plugin message to this player over the given channel.Methods inherited from interface wtf.choco.veinminer.platform.PlatformCommandSender
getName, hasPermission, sendMessage
-
Method Details
-
isOnline
boolean isOnline()Check whether or not this player is online the server.- Returns:
- true if online, false if offline
-
getUniqueId
Get theUUID
of this player.- Returns:
- the uuid
-
getWorld
Get theworld
in which this player currently resides.- Returns:
- the world
-
getItemInMainHand
Get theItemStack
in the player's main hand.- Returns:
- the item stack
-
getTargetBlock
Get the block the player is looking at within the given distance. If the player is looking at a block that exceeds the given distance, the result will be empty.- Parameters:
distance
- the maximum block distance- Returns:
- the result of the ray trace
-
getGameMode
Get theGameMode
of this player.- Returns:
- the game mode
-
isSneaking
boolean isSneaking()Check whether or not this player is sneaking.- Returns:
- true if sneaking, false otherwise
-
sendPluginMessage
Send a plugin message to this player over the given channel.- Parameters:
channel
- the channel on which to send the messagemessage
- the message contents
-
kick
Kick this player from the server with the given disconnect message.- Parameters:
message
- the disconnect message
-