Package net.minestom.server.event.player
Class PlayerSpawnEvent
java.lang.Object
net.minestom.server.event.Event
net.minestom.server.event.entity.EntitySpawnEvent
net.minestom.server.event.player.PlayerSpawnEvent
public class PlayerSpawnEvent extends EntitySpawnEvent
Called when a new instance is set for a player.
-
Constructor Summary
Constructors Constructor Description PlayerSpawnEvent(Entity entity, Instance spawnInstance, boolean firstSpawn)
-
Method Summary
Modifier and Type Method Description boolean
isFirstSpawn()
'true' if the player is spawning for the first time.Methods inherited from class net.minestom.server.event.entity.EntitySpawnEvent
getEntity, getSpawnInstance
-
Constructor Details
-
Method Details
-
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
-