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

      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 username
      java.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 on
      java.util.UUID getUniqueId()
      Gets the player's unique id (UUID)
      boolean hasPermission​(java.lang.String permission)
      Checks if the player has a certain permission
      boolean isConnected()
      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 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
      • Methods inherited from interface net.kyori.adventure.pointer.Pointered

        get, getOrDefault, getOrDefaultFrom, pointers
    • 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 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​(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()