Class DefaultPlayerExecutor
- java.lang.Object
-
- de.dytanic.cloudnet.ext.bridge.player.executor.DefaultPlayerExecutor
-
- All Implemented Interfaces:
PlayerExecutor
public class DefaultPlayerExecutor extends java.lang.Object implements PlayerExecutor
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.UUIDGLOBAL_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.Builderbuilder()voidconnect(@NotNull ServerSelectorType selectorType)Connects an online player to one service selected by the selector out of the global list of services.voidconnect(@NotNull java.lang.String serviceName)Connects an online player to a specific service.voidconnectToFallback()Connects an online player to a fallback exactly like it is done in the hub command or on login.voidconnectToGroup(@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.voidconnectToTask(@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.voiddispatchProxyCommand(@NotNull java.lang.String command)Dispatches a command on the proxy the player is connected with as the player.@NotNull java.util.UUIDgetPlayerUniqueId()Gets the uniqueId of the player this player executor handles.voidkick(@NotNull java.lang.String message)Kicks an online player from the network with a specific reason.voidsendChatMessage(@NotNull java.lang.String message)Sends a plugin message to a specific online player.voidsendChatMessage(@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.voidsendPluginMessage(@NotNull java.lang.String tag, @org.jetbrains.annotations.NotNull byte[] data)Sends a message to a specific online player.
-
-
-
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:PlayerExecutorGets the uniqueId of the player this player executor handles.- Specified by:
getPlayerUniqueIdin interfacePlayerExecutor- Returns:
- the UUID of the player
-
connect
public void connect(@NotNull @NotNull java.lang.String serviceName)Description copied from interface:PlayerExecutorConnects an online player to a specific service.- Specified by:
connectin interfacePlayerExecutor- 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:PlayerExecutorKicks an online player from the network with a specific reason.- Specified by:
kickin interfacePlayerExecutor- 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:PlayerExecutorSends a plugin message to a specific online player.- Specified by:
sendChatMessagein interfacePlayerExecutor- 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:PlayerExecutorSends 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:
sendChatMessagein interfacePlayerExecutor- Parameters:
message- the message to be sent to the playerpermission- 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:PlayerExecutorSends a message to a specific online player. The tag has to be registered in the proxy.- Specified by:
sendPluginMessagein interfacePlayerExecutor- Parameters:
tag- the tag of the plugin messagedata- the data of the plugin message
-
dispatchProxyCommand
public void dispatchProxyCommand(@NotNull @NotNull java.lang.String command)Description copied from interface:PlayerExecutorDispatches a command on the proxy the player is connected with as the player.- Specified by:
dispatchProxyCommandin interfacePlayerExecutor- Parameters:
command- the command to dispatch
-
connect
public void connect(@NotNull @NotNull ServerSelectorType selectorType)Description copied from interface:PlayerExecutorConnects an online player to one service selected by the selector out of the global list of services.- Specified by:
connectin interfacePlayerExecutor- Parameters:
selectorType- the type for sorting
-
connectToFallback
public void connectToFallback()
Description copied from interface:PlayerExecutorConnects an online player to a fallback exactly like it is done in the hub command or on login.- Specified by:
connectToFallbackin interfacePlayerExecutor
-
connectToGroup
public void connectToGroup(@NotNull @NotNull java.lang.String group, @NotNull @NotNull ServerSelectorType selectorType)Description copied from interface:PlayerExecutorConnects an online player to one service selected by the selector out of the global list of services with the given group.- Specified by:
connectToGroupin interfacePlayerExecutorselectorType- the type for sorting
-
connectToTask
public void connectToTask(@NotNull @NotNull java.lang.String task, @NotNull @NotNull ServerSelectorType selectorType)Description copied from interface:PlayerExecutorConnects an online player to one service selected by the selector out of the global list of services with the given task.- Specified by:
connectToTaskin interfacePlayerExecutorselectorType- the type for sorting
-
-