Class DefaultPlayerExecutor

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.UUID GLOBAL_ID  
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultPlayerExecutor​(@NotNull java.util.UUID uniqueId)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static de.dytanic.cloudnet.driver.channel.ChannelMessage.Builder builder()  
      void connect​(@NotNull ServerSelectorType selectorType)
      Connects an online player to one service selected by the selector out of the global list of services.
      void connect​(@NotNull java.lang.String serviceName)
      Connects an online player to a specific service.
      void connectToFallback()
      Connects an online player to a fallback exactly like it is done in the hub command or on login.
      void connectToGroup​(@NotNull java.lang.String group, @NotNull ServerSelectorType selectorType)
      Connects an online player to one service selected by the selector out of the global list of services with the given group.
      void connectToTask​(@NotNull java.lang.String task, @NotNull ServerSelectorType selectorType)
      Connects an online player to one service selected by the selector out of the global list of services with the given task.
      void dispatchProxyCommand​(@NotNull java.lang.String command)
      Dispatches a command on the proxy the player is connected with as the player.
      @NotNull java.util.UUID getPlayerUniqueId()
      Gets the uniqueId of the player this player executor handles.
      void kick​(@NotNull java.lang.String message)
      Kicks an online player from the network with a specific reason.
      void sendChatMessage​(@NotNull java.lang.String message)
      Sends a plugin message to a specific online player.
      void sendChatMessage​(@NotNull java.lang.String message, @Nullable java.lang.String permission)
      Sends a plugin message to a specific online player only if the player has the given permission.
      void sendPluginMessage​(@NotNull java.lang.String tag, @org.jetbrains.annotations.NotNull byte[] data)
      Sends a message to a specific online player.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • GLOBAL_ID

        public static final java.util.UUID GLOBAL_ID
    • Constructor Detail

      • DefaultPlayerExecutor

        public DefaultPlayerExecutor​(@NotNull
                                     @NotNull java.util.UUID uniqueId)
    • Method Detail

      • builder

        public static de.dytanic.cloudnet.driver.channel.ChannelMessage.Builder builder()
      • getPlayerUniqueId

        @NotNull
        public @NotNull java.util.UUID getPlayerUniqueId()
        Description copied from interface: PlayerExecutor
        Gets the uniqueId of the player this player executor handles.
        Specified by:
        getPlayerUniqueId in interface PlayerExecutor
        Returns:
        the UUID of the player
      • connect

        public void connect​(@NotNull
                            @NotNull java.lang.String serviceName)
        Description copied from interface: PlayerExecutor
        Connects an online player to a specific service.
        Specified by:
        connect in interface PlayerExecutor
        Parameters:
        serviceName - the name of the service the player should be sent to
      • kick

        public void kick​(@NotNull
                         @NotNull java.lang.String message)
        Description copied from interface: PlayerExecutor
        Kicks an online player from the network with a specific reason.
        Specified by:
        kick in interface PlayerExecutor
        Parameters:
        message - the reason for the kick which will be displayed in the players client
      • sendChatMessage

        public void sendChatMessage​(@NotNull
                                    @NotNull java.lang.String message)
        Description copied from interface: PlayerExecutor
        Sends a plugin message to a specific online player.
        Specified by:
        sendChatMessage in interface PlayerExecutor
        Parameters:
        message - the message to be sent to the player
      • sendChatMessage

        public void sendChatMessage​(@NotNull
                                    @NotNull java.lang.String message,
                                    @Nullable
                                    @Nullable java.lang.String permission)
        Description copied from interface: PlayerExecutor
        Sends a plugin message to a specific online player only if the player has the given permission. If the permission is null, the message will be sent.
        Specified by:
        sendChatMessage in interface PlayerExecutor
        Parameters:
        message - the message to be sent to the player
        permission - the permission which will be checked before the message is sent to the player
      • sendPluginMessage

        public void sendPluginMessage​(@NotNull
                                      @NotNull java.lang.String tag,
                                      @NotNull
                                      @org.jetbrains.annotations.NotNull byte[] data)
        Description copied from interface: PlayerExecutor
        Sends a message to a specific online player. The tag has to be registered in the proxy.
        Specified by:
        sendPluginMessage in interface PlayerExecutor
        Parameters:
        tag - the tag of the plugin message
        data - the data of the plugin message
      • dispatchProxyCommand

        public void dispatchProxyCommand​(@NotNull
                                         @NotNull java.lang.String command)
        Description copied from interface: PlayerExecutor
        Dispatches a command on the proxy the player is connected with as the player.
        Specified by:
        dispatchProxyCommand in interface PlayerExecutor
        Parameters:
        command - the command to dispatch
      • connect

        public void connect​(@NotNull
                            @NotNull ServerSelectorType selectorType)
        Description copied from interface: PlayerExecutor
        Connects an online player to one service selected by the selector out of the global list of services.
        Specified by:
        connect in interface PlayerExecutor
        Parameters:
        selectorType - the type for sorting
      • connectToFallback

        public void connectToFallback()
        Description copied from interface: PlayerExecutor
        Connects an online player to a fallback exactly like it is done in the hub command or on login.
        Specified by:
        connectToFallback in interface PlayerExecutor
      • connectToGroup

        public void connectToGroup​(@NotNull
                                   @NotNull java.lang.String group,
                                   @NotNull
                                   @NotNull ServerSelectorType selectorType)
        Description copied from interface: PlayerExecutor
        Connects an online player to one service selected by the selector out of the global list of services with the given group.
        Specified by:
        connectToGroup in interface PlayerExecutor
        selectorType - the type for sorting
      • connectToTask

        public void connectToTask​(@NotNull
                                  @NotNull java.lang.String task,
                                  @NotNull
                                  @NotNull ServerSelectorType selectorType)
        Description copied from interface: PlayerExecutor
        Connects an online player to one service selected by the selector out of the global list of services with the given task.
        Specified by:
        connectToTask in interface PlayerExecutor
        selectorType - the type for sorting