Package us.ajg0702.queue.api.players
Interface AdaptedPlayer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
connect(AdaptedServer server)
Sends the player to a different server.default boolean
equals(AdaptedPlayer other)
AdaptedServer
getCurrentServer()
Gets the server that the player is currently connected to@Nullable java.lang.String
getName()
Gets the player's usernamejava.util.List<java.lang.String>
getPermissions()
int
getProtocolVersion()
Returns the version this player is running.java.lang.String
getServerName()
Gets the name of the server the player is currently onjava.util.UUID
getUniqueId()
Gets the player's unique id (UUID)boolean
hasPermission(java.lang.String permission)
Checks if the player has a certain permissionboolean
isConnected()
Check if the plauer is currently connectedvoid
kick(net.kyori.adventure.text.Component reason)
Kick a player from the proxyvoid
sendActionBar(@NotNull net.kyori.adventure.text.Component message)
Sends an actionbar message to the playervoid
sendMessage(@NotNull net.kyori.adventure.text.Component message)
Send a player a message from a Componentvoid
sendMessage(java.lang.String message)
Send a player a message from a string Converted to Component internally-
Methods 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, stopSound
-
-
-
-
Method Detail
-
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:
sendMessage
in 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:
sendActionBar
in interfacenet.kyori.adventure.audience.Audience
- Parameters:
message
- The message to send
-
sendMessage
void sendMessage(java.lang.String message)
Send a player a message from a string Converted to Component internally- Parameters:
message
- The message to send
-
hasPermission
boolean hasPermission(java.lang.String permission)
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
java.lang.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
java.util.UUID getUniqueId()
Gets the player's unique id (UUID)- Returns:
- The player's uuid
-
connect
void connect(AdaptedServer server)
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
@Nullable @Nullable java.lang.String 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
java.util.List<java.lang.String> getPermissions()
-
equals
default boolean equals(AdaptedPlayer other)
-
-