Class CreatureSpawnEvent

All Implemented Interfaces:

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

If a Creature Spawn event is cancelled, the creature will not spawn.

  • Constructor Details

  • Method Details

    • getEntity

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

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