Interface PlayerExecutor
-
- All Known Implementing Classes:
DefaultPlayerExecutor
public interface PlayerExecutor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
-
getPlayerUniqueId
@NotNull @NotNull java.util.UUID getPlayerUniqueId()
Gets the uniqueId of the player this player executor handles.- Returns:
- the UUID of the player
-
connect
void connect(@NotNull @NotNull java.lang.String serviceName)Connects an online player to a specific service.- Parameters:
serviceName- the name of the service the player should be sent to
-
connect
void connect(@NotNull @NotNull ServerSelectorType selectorType)Connects an online player to one service selected by the selector out of the global list of services.- Parameters:
selectorType- the type for sorting
-
connectToFallback
void connectToFallback()
Connects an online player to a fallback exactly like it is done in the hub command or on login.
-
connectToGroup
void connectToGroup(@NotNull @NotNull java.lang.String group, @NotNull @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.- Parameters:
selectorType- the type for sorting
-
connectToTask
void connectToTask(@NotNull @NotNull java.lang.String task, @NotNull @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.- Parameters:
selectorType- the type for sorting
-
kick
void kick(@NotNull @NotNull java.lang.String message)Kicks an online player from the network with a specific reason.- Parameters:
message- the reason for the kick which will be displayed in the players client
-
sendChatMessage
void sendChatMessage(@NotNull @NotNull java.lang.String message)Sends a plugin message to a specific online player.- Parameters:
message- the message to be sent to the player
-
sendChatMessage
void sendChatMessage(@NotNull @NotNull java.lang.String message, @Nullable @Nullable java.lang.String permission)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.- 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
void sendPluginMessage(@NotNull @NotNull java.lang.String tag, @NotNull @org.jetbrains.annotations.NotNull byte[] data)Sends a message to a specific online player. The tag has to be registered in the proxy.- Parameters:
tag- the tag of the plugin messagedata- the data of the plugin message
-
dispatchProxyCommand
void dispatchProxyCommand(@NotNull @NotNull java.lang.String command)Dispatches a command on the proxy the player is connected with as the player.- Parameters:
command- the command to dispatch
-
-