Package us.ajg0702.queue.api.players
Interface AdaptedPlayer
- All Superinterfaces:
net.kyori.adventure.audience.Audience,Handle,net.kyori.adventure.pointer.Pointered
Represents a cross-platform player
-
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(AdaptedServer server) Sends the player to a different server.default booleanequals(AdaptedPlayer other) Gets the server that the player is currently connected to@Nullable StringgetName()Gets the player's usernameintReturns the version this player is running.Gets the name of the server the player is currently onGets the player's unique id (UUID)booleanhasPermission(String permission) Checks if the player has a certain permissionbooleanCheck if the plauer is currently connectedvoidkick(net.kyori.adventure.text.Component reason) Kick a player from the proxyvoidsendActionBar(@NotNull net.kyori.adventure.text.Component message) Sends an actionbar message to the playervoidsendMessage(@NotNull net.kyori.adventure.text.Component message) Send a player a message from a ComponentvoidsendMessage(String message) Send a player a message from a string Converted to Component internallyMethods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, clearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, sendResourcePacks, sendTitlePart, showBossBar, showTitle, stopSound, stopSoundMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
-
Method Details
-
isConnected
boolean isConnected()Check if the plauer is currently connected- Returns:
- True if connected, false if not
-
sendMessage
void sendMessage(@NotNull @NotNull net.kyori.adventure.text.Component message) Send a player a message from a Component- Specified by:
sendMessagein interfacenet.kyori.adventure.audience.Audience- Parameters:
message- The message to send
-
sendActionBar
void sendActionBar(@NotNull @NotNull net.kyori.adventure.text.Component message) Sends an actionbar message to the player- Specified by:
sendActionBarin interfacenet.kyori.adventure.audience.Audience- Parameters:
message- The message to send
-
sendMessage
Send a player a message from a string Converted to Component internally- Parameters:
message- The message to send
-
hasPermission
Checks if the player has a certain permission- Parameters:
permission- The permission to check- Returns:
- True if they have the permission, false if not
-
getServerName
String getServerName()Gets the name of the server the player is currently on- Returns:
- The name of the server
-
getCurrentServer
AdaptedServer getCurrentServer()Gets the server that the player is currently connected to- Returns:
- The server that the player is currently connected to.
-
getUniqueId
UUID getUniqueId()Gets the player's unique id (UUID)- Returns:
- The player's uuid
-
connect
Sends the player to a different server. Does not use the queue. -
getProtocolVersion
int getProtocolVersion()Returns the version this player is running.- Returns:
- the version
-
getName
Gets the player's username- Returns:
- the player's username
-
kick
void kick(net.kyori.adventure.text.Component reason) Kick a player from the proxy- Parameters:
reason- The reason to kick them with
-
getPermissions
-
equals
-