Class EntitySpawnEvent

java.lang.Object
net.minestom.server.event.entity.EntitySpawnEvent
All Implemented Interfaces:
Event, EntityEvent, EntityInstanceEvent, InstanceEvent

public class EntitySpawnEvent extends Object implements EntityInstanceEvent
Called when a new instance is set for an entity.
  • Constructor Details

    • EntitySpawnEvent

      public EntitySpawnEvent(@NotNull @NotNull Entity entity, @NotNull @NotNull Instance spawnInstance)
  • Method Details

    • getEntity

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

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