Class CreatureSpawnEvent

All Implemented Interfaces:
Cancellable

public class CreatureSpawnEvent extends EntitySpawnEvent
Called when a creature is spawned into a world.

If this event is cancelled, the creature will not spawn.

Since:
1.0.0
  • Constructor Details

  • Method Details

    • getEntity

      @NotNull public @NotNull LivingEntity getEntity()
      Description copied from class: EntityEvent
      Returns the Entity involved in this event
      Overrides:
      getEntity in class EntityEvent
      Returns:
      Entity who is involved in this event
      Since:
      1.1.0
    • getSpawnReason

      @NotNull public @NotNull CreatureSpawnEvent.SpawnReason getSpawnReason()
      Gets the reason for why the creature is being spawned.
      Returns:
      A SpawnReason value detailing the reason for the creature being spawned
      Since:
      1.0.0