Class WaterDogPEDirectPlayerExecutor

java.lang.Object
eu.cloudnetservice.modules.bridge.platform.PlatformPlayerExecutorAdapter<dev.waterdog.waterdogpe.player.ProxiedPlayer>
eu.cloudnetservice.modules.bridge.platform.waterdog.WaterDogPEDirectPlayerExecutor
All Implemented Interfaces:
PlayerExecutor

final class WaterDogPEDirectPlayerExecutor extends PlatformPlayerExecutorAdapter<dev.waterdog.waterdogpe.player.ProxiedPlayer>
  • Field Details

    • proxyServer

      private final dev.waterdog.waterdogpe.ProxyServer proxyServer
    • management

      private final PlatformBridgeManagement<dev.waterdog.waterdogpe.player.ProxiedPlayer,?> management
  • Constructor Details

  • Method Details

    • connect

      public void connect(@NonNull @NonNull String serviceName)
      Description copied from interface: PlayerExecutor
      Connects the player associated with this player executor to the given service.
      Parameters:
      serviceName - the service to connect the player to.
    • connectSelecting

      public void connectSelecting(@NonNull @NonNull ServerSelectorType selectorType)
      Description copied from interface: PlayerExecutor
      Connects the player associated with this player executor to any service running the cluster. The service is chosen by the given server selector.
      Parameters:
      selectorType - the selector used for the service selection.
    • connectToFallback

      public void connectToFallback()
      Description copied from interface: PlayerExecutor
      Connects the player associated with this player executor to the best matching fallback.
    • connectToGroup

      public void connectToGroup(@NonNull @NonNull String group, @NonNull @NonNull ServerSelectorType selectorType)
      Description copied from interface: PlayerExecutor
      Connects the player associated with this player executor to any service having the given group assigned. The service is chosen by the given server selector.
      Parameters:
      group - the group a service has to have.
      selectorType - the selector used for the service selection.
    • connectToTask

      public void connectToTask(@NonNull @NonNull String task, @NonNull @NonNull ServerSelectorType selectorType)
      Description copied from interface: PlayerExecutor
      Connects the player associated with this player executor to any service having the given task assigned. The service is chosen by the given server selector.
      Parameters:
      task - the task the service has to have.
      selectorType - the selector used for the service selection.
    • kick

      public void kick(@NonNull @NonNull Component message)
      Description copied from interface: PlayerExecutor
      Kicks the player associated with this player executor and the component as reason.
      Parameters:
      message - the message to display in the disconnect screen.
    • sendChatMessage

      public void sendChatMessage(@NonNull @NonNull Component message, @Nullable @Nullable String permission)
      Description copied from interface: PlayerExecutor
      Sends the given message component as chat message to the player associated with this player executor.

      If a permission is given the player is required to have the permission, otherwise the message is not sent.

      Parameters:
      message - the message to send to the player.
      permission - the permission required to get the message.
    • sendPluginMessage

      public void sendPluginMessage(@NonNull @NonNull String key, byte[] data)
      Description copied from interface: PlayerExecutor
      Sends a plugin channel message to the player associated with this player executor using the given channel and data. The channel used has to be registered on the service software.
      Parameters:
      key - the channel to send the plugin message in.
      data - the data to send to the player.
    • spoofCommandExecution

      public void spoofCommandExecution(@NonNull @NonNull String command, boolean redirectToServer)
      Description copied from interface: PlayerExecutor
      Spoofs the command execution for the player associated with this player executor. The given command input should not contain a leading slash as it is added on the fly.

      If redirecting to the downstream service is desired the command is executed on the proxy first, if no command was found it is redirected to the downstream service the player is connected to.

      Parameters:
      command - the command to execute for the player.
      redirectToServer - whether to command should get redirected to the downstream.