java.lang.Object
net.minestom.server.event.player.AsyncPlayerPreLoginEvent
- All Implemented Interfaces:
Event
,AsyncEvent
Called before the player initialization, it can be used to kick the player before any connection
or to change his final username/uuid.
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncPlayerPreLoginEvent
(PlayerConnection connection, GameProfile gameProfile, LoginPluginMessageProcessor pluginMessageProcessor) -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.sendPluginRequest
(String channel, byte[] requestPayload) Sends a login plugin message request.void
setGameProfile
(GameProfile gameProfile) void
setUsername
(String username) Deprecated.
-
Constructor Details
-
AsyncPlayerPreLoginEvent
public AsyncPlayerPreLoginEvent(PlayerConnection connection, GameProfile gameProfile, LoginPluginMessageProcessor pluginMessageProcessor)
-
-
Method Details
-
getConnection
-
getGameProfile
-
setGameProfile
-
sendPluginRequest
public CompletableFuture<LoginPlugin.Response> sendPluginRequest(String channel, byte[] requestPayload) Sends a login plugin message request. Can be useful to negotiate with modded clients or proxies before moving on to the Configuration state.- Parameters:
channel
- the plugin message channelrequestPayload
- the contents of the plugin message, can be null for empty- Returns:
- a CompletableFuture for the response. The thread on which it completes is asynchronous.
-
getUsername
Deprecated. -
setUsername
Deprecated. -
getPlayerUuid
Deprecated.
-