Package net.minestom.server.event.player
Class AsyncPlayerPreLoginEvent
java.lang.Object
net.minestom.server.event.player.AsyncPlayerPreLoginEvent
- All Implemented Interfaces:
Event,EntityEvent,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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull PlayerGets the player.@NotNull UUIDGets the player uuid.@NotNull StringGets the player username.voidsetPlayerUuid(@NotNull UUID playerUuid) Changes the player uuid.voidsetUsername(@NotNull String username) Changes the player username.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minestom.server.event.trait.PlayerEvent
getEntity
-
Constructor Details
-
AsyncPlayerPreLoginEvent
-
-
Method Details
-
getUsername
Gets the player username.- Returns:
- the player username
-
setUsername
Changes the player username.- Parameters:
username- the new player username
-
getPlayerUuid
Gets the player uuid.- Returns:
- the player uuid
-
setPlayerUuid
Changes the player uuid.- Parameters:
playerUuid- the new player uuid
-
getPlayer
Description copied from interface:PlayerEventGets the player.- Specified by:
getPlayerin interfacePlayerEvent- Returns:
- the player
-