Class AsyncPlayerPreLoginEvent

java.lang.Object
net.minestom.server.event.player.AsyncPlayerPreLoginEvent
All Implemented Interfaces:
Event

public class AsyncPlayerPreLoginEvent extends Object implements Event
Called before the player initialization, it can be used to kick the player before any connection or to change his final username/uuid.
  • Constructor Details

  • Method Details

    • getConnection

      @NotNull public @NotNull PlayerConnection getConnection()
    • getGameProfile

      public GameProfile getGameProfile()
    • setGameProfile

      public void setGameProfile(GameProfile gameProfile)
    • sendPluginRequest

      @NotNull public @NotNull 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 channel
      requestPayload - 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 @NotNull public @NotNull String getUsername()
      Deprecated.
    • setUsername

      @Deprecated public void setUsername(@NotNull @NotNull String username)
      Deprecated.
    • getPlayerUuid

      @Deprecated @NotNull public @NotNull UUID getPlayerUuid()
      Deprecated.