Class SpawnerDropEvent

java.lang.Object
org.bukkit.event.Event
de.marcely.bedwars.api.event.arena.SpawnerDropEvent
All Implemented Interfaces:
ArenaEvent, Cancellable

public class SpawnerDropEvent extends Event implements ArenaEvent, Cancellable
Gets called whenever a spawner drops something.

This event is getting called very frequently, so make sure that anything that you're doing isn't causing a huge CPU usage.

  • Constructor Details

    • SpawnerDropEvent

      public SpawnerDropEvent(Spawner spawner, ItemStack[] droppingMaterials)
  • Method Details

    • getSpawner

      public Spawner getSpawner()
      Returns the spawner that's about to drop something.
      Returns:
      The spawner involved in this event
    • getDroppingMaterials

      public ItemStack[] getDroppingMaterials()
      Returns all the DropTypes a spawner should drop.
      Returns:
      An array of all the ItemStacks the spawner will drop
    • setDroppingMaterials

      public void setDroppingMaterials(ItemStack[] droppingMaterials)
      Change the materials that the spawner should drop
      Parameters:
      droppingMaterials - The materials the spawner will drop
    • getArena

      public Arena getArena()
      Description copied from interface: ArenaEvent
      Returns the Arena that is involved in this event.
      Specified by:
      getArena in interface ArenaEvent
      Returns:
      The arena that is involved
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface Cancellable
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()