Class NodePlayerExecutor
java.lang.Object
eu.cloudnetservice.modules.bridge.node.player.NodePlayerExecutor
- All Implemented Interfaces:
PlayerExecutor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final PlayerExecutorprotected final PlayerManagerprotected final UUIDFields inherited from interface eu.cloudnetservice.modules.bridge.player.executor.PlayerExecutor
GLOBAL_UNIQUE_ID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNodePlayerExecutor(@NonNull UUID targetUniqueId) NodePlayerExecutor(@NonNull UUID targetUniqueId, @NonNull PlayerManager playerManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidConnects the player associated with this player executor to the given service.voidconnectSelecting(@NonNull ServerSelectorType selectorType) Connects the player associated with this player executor to any service running the cluster.voidConnects the player associated with this player executor to the best matching fallback.voidconnectToGroup(@NonNull String group, @NonNull ServerSelectorType selectorType) Connects the player associated with this player executor to any service having the given group assigned.voidconnectToTask(@NonNull String task, @NonNull ServerSelectorType selectorType) Connects the player associated with this player executor to any service having the given task assigned.voidKicks the player associated with this player executor and the component as reason.voidsendChatMessage(@NonNull Component message, @Nullable String permission) Sends the given message component as chat message to the player associated with this player executor.voidsendPluginMessage(@NonNull String key, byte[] data) Sends a plugin channel message to the player associated with this player executor using the given channel and data.voidSends the given title to the player associated with this player executor.voidspoofCommandExecution(@NonNull String command, boolean redirectToServer) Spoofs the command execution for the player associated with this player executor.protected eu.cloudnetservice.driver.channel.ChannelMessage.BuildertoProxy()uniqueId()Gets the unique id of this player executor.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.cloudnetservice.modules.bridge.player.executor.PlayerExecutor
sendChatMessage, spoofCommandExecution
-
Field Details
-
GLOBAL
-
targetUniqueId
-
playerManager
-
-
Constructor Details
-
NodePlayerExecutor
-
NodePlayerExecutor
-
-
Method Details
-
uniqueId
Description copied from interface:PlayerExecutorGets the unique id of this player executor. The ID of the player executor equals the unique id of the player this executor is for.A global player executor that performs the action for all players is identified by the
PlayerExecutor.GLOBAL_UNIQUE_ID.- Specified by:
uniqueIdin interfacePlayerExecutor- Returns:
- the unique id of the player executor.
-
connect
Description copied from interface:PlayerExecutorConnects the player associated with this player executor to the given service.- Specified by:
connectin interfacePlayerExecutor- Parameters:
serviceName- the service to connect the player to.
-
connectSelecting
Description copied from interface:PlayerExecutorConnects the player associated with this player executor to any service running the cluster. The service is chosen by the given server selector.- Specified by:
connectSelectingin interfacePlayerExecutor- Parameters:
selectorType- the selector used for the service selection.
-
connectToFallback
public void connectToFallback()Description copied from interface:PlayerExecutorConnects the player associated with this player executor to the best matching fallback.- Specified by:
connectToFallbackin interfacePlayerExecutor
-
connectToGroup
public void connectToGroup(@NonNull @NonNull String group, @NonNull @NonNull ServerSelectorType selectorType) Description copied from interface:PlayerExecutorConnects the player associated with this player executor to any service having the given group assigned. The service is chosen by the given server selector.- Specified by:
connectToGroupin interfacePlayerExecutor- 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:PlayerExecutorConnects the player associated with this player executor to any service having the given task assigned. The service is chosen by the given server selector.- Specified by:
connectToTaskin interfacePlayerExecutor- Parameters:
task- the task the service has to have.selectorType- the selector used for the service selection.
-
kick
Description copied from interface:PlayerExecutorKicks the player associated with this player executor and the component as reason.- Specified by:
kickin interfacePlayerExecutor- Parameters:
message- the message to display in the disconnect screen.
-
sendTitle
Description copied from interface:PlayerExecutorSends the given title to the player associated with this player executor.- Specified by:
sendTitlein interfacePlayerExecutor- Parameters:
title- the title to display to the player.
-
sendChatMessage
public void sendChatMessage(@NonNull @NonNull Component message, @Nullable @Nullable String permission) Description copied from interface:PlayerExecutorSends 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.
- Specified by:
sendChatMessagein interfacePlayerExecutor- Parameters:
message- the message to send to the player.permission- the permission required to get the message.
-
sendPluginMessage
Description copied from interface:PlayerExecutorSends 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.- Specified by:
sendPluginMessagein interfacePlayerExecutor- Parameters:
key- the channel to send the plugin message in.data- the data to send to the player.
-
spoofCommandExecution
Description copied from interface:PlayerExecutorSpoofs 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.
- Specified by:
spoofCommandExecutionin interfacePlayerExecutor- Parameters:
command- the command to execute for the player.redirectToServer- whether to command should get redirected to the downstream.
-
toProxy
-