Interface AdaptedPlayer

All Superinterfaces:
net.kyori.adventure.audience.Audience, Handle, net.kyori.adventure.pointer.Pointered

public interface AdaptedPlayer extends Handle, net.kyori.adventure.audience.Audience
Represents a cross-platform player
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sends the player to a different server.
    default boolean
     
    Gets the server that the player is currently connected to
    @Nullable String
    Gets the player's username
     
    int
    Returns the version this player is running.
    Gets the name of the server the player is currently on
    Gets the player's unique id (UUID)
    boolean
    hasPermission(String permission)
    Checks if the player has a certain permission
    boolean
    Check if the plauer is currently connected
    void
    kick(net.kyori.adventure.text.Component reason)
    Kick a player from the proxy
    void
    sendActionBar(@NotNull net.kyori.adventure.text.Component message)
    Sends an actionbar message to the player
    void
    sendMessage(@NotNull net.kyori.adventure.text.Component message)
    Send a player a message from a Component
    void
    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

    Methods inherited from interface us.ajg0702.queue.api.util.Handle

    getHandle

    Methods 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:
      sendMessage in interface net.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 interface net.kyori.adventure.audience.Audience
      Parameters:
      message - The message to send
    • sendMessage

      void sendMessage(String message)
      Send a player a message from a string Converted to Component internally
      Parameters:
      message - The message to send
    • hasPermission

      boolean hasPermission(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

      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

      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 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

      List<String> getPermissions()
    • equals

      default boolean equals(AdaptedPlayer other)