Class SpawnerSpawnEvent

All Implemented Interfaces:
Cancellable

public class SpawnerSpawnEvent extends EntitySpawnEvent
Called when an entity is spawned into a world by a spawner.

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

  • Constructor Details

    • SpawnerSpawnEvent

      @Internal public SpawnerSpawnEvent(@NotNull @NotNull Entity spawnee, @Nullable @Nullable CreatureSpawner spawner)
  • Method Details

    • getSpawner

      @Nullable public @Nullable CreatureSpawner getSpawner()
      Gets the spawner tile state, or null when the entity is spawned from a minecart spawner.
      Returns:
      the spawner tile state