Class PlayerSpawnEvent

java.lang.Object

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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