Class AsyncPlayerPreLoginEvent

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

public class AsyncPlayerPreLoginEvent extends Object implements PlayerEvent
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

    • AsyncPlayerPreLoginEvent

      public AsyncPlayerPreLoginEvent(@NotNull @NotNull Player player)
  • Method Details

    • getUsername

      @NotNull public @NotNull String getUsername()
      Gets the player username.
      Returns:
      the player username
    • setUsername

      public void setUsername(@NotNull @NotNull String username)
      Changes the player username.
      Parameters:
      username - the new player username
    • getPlayerUuid

      @NotNull public @NotNull UUID getPlayerUuid()
      Gets the player uuid.
      Returns:
      the player uuid
    • setPlayerUuid

      public void setPlayerUuid(@NotNull @NotNull UUID playerUuid)
      Changes the player uuid.
      Parameters:
      playerUuid - the new player uuid
    • getPlayer

      @NotNull public @NotNull Player getPlayer()
      Description copied from interface: PlayerEvent
      Gets the player.
      Specified by:
      getPlayer in interface PlayerEvent
      Returns:
      the player