Class PlayerSpawnEvent
java.lang.Object
net.minestom.server.event.player.PlayerSpawnEvent
- All Implemented Interfaces:
Event, EntityEvent, EntityInstanceEvent, InstanceEvent, PlayerEvent, PlayerInstanceEvent
Called when a new instance is set for a player.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the player.Deprecated.boolean'true' if the player is spawning for the first time.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EntityInstanceEvent
getInstanceMethods inherited from interface PlayerEvent
getEntity
-
Constructor Details
-
PlayerSpawnEvent
-
-
Method Details
-
getSpawnInstance
Deprecated.Gets the player's new instance.- Returns:
- the instance
-
isFirstSpawn
public boolean isFirstSpawn()'true' if the player is spawning for the first time. 'false' if this spawn event was triggered by a dimension teleport- Returns:
- true if this is the first spawn, false otherwise
-
getPlayer
Description copied from interface:PlayerEventGets the player.- Specified by:
getPlayerin interfacePlayerEvent- Returns:
- the player
-