Package net.minestom.server.event.player
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
ConstructorDescriptionPlayerSpawnEvent
(@NotNull Player player, @NotNull Instance spawnInstance, boolean firstSpawn) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minestom.server.event.trait.EntityInstanceEvent
getInstance
Methods inherited from interface net.minestom.server.event.trait.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:PlayerEvent
Gets the player.- Specified by:
getPlayer
in interfacePlayerEvent
- Returns:
- the player
-