Class EntitySpawnEvent

java.lang.Object
net.minestom.server.event.Event
net.minestom.server.event.entity.EntitySpawnEvent
Direct Known Subclasses:
PlayerSpawnEvent

public class EntitySpawnEvent
extends Event
Called when a new instance is set for an entity.
  • Constructor Summary

    Constructors 
    Constructor Description
    EntitySpawnEvent​(Entity entity, Instance spawnInstance)  
  • Method Summary

    Modifier and Type Method Description
    Entity getEntity()
    Gets the entity who spawned in the instance.
    Instance getSpawnInstance()
    Gets the entity new instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getEntity

      @NotNull public Entity getEntity()
      Gets the entity who spawned in the instance.
      Returns:
      the entity
    • getSpawnInstance

      @NotNull public Instance getSpawnInstance()
      Gets the entity new instance.
      Returns:
      the instance