Class AngelChestSpawnPrepareEvent

java.lang.Object
org.bukkit.event.Event
de.jeff_media.angelchest.events.AngelChestSpawnPrepareEvent
All Implemented Interfaces:
Cancellable

public class AngelChestSpawnPrepareEvent extends Event implements Cancellable
Called before an AngelChest is being spawned
  • Constructor Details

  • Method Details

    • getPlayerDeathEvent

      public PlayerDeathEvent getPlayerDeathEvent()
      Gets the PlayerDeathEvent that caused this de.jeff_media.angelchest.AngelChest to be spawned
      Returns:
      PlayerDeathEvent related to this de.jeff_media.angelchest.AngelChest spawn attempt
    • getPlayer

      public Player getPlayer()
      Gets the player who died
      Returns:
      Player who died
    • getBlock

      public Block getBlock()
      Gets the block where the de.jeff_media.angelchest.AngelChest will be created
      Returns:
      Block where the de.jeff_media.angelchest.AngelChest will be created
    • setBlock

      public void setBlock(Block block)
      Sets a new Block where the de.jeff_media.angelchest.AngelChest should be located
      Parameters:
      block - Block where the de.jeff_media.angelchest.AngelChest should be located
    • getDamageCause

      public EntityDamageEvent.DamageCause getDamageCause()
      Gets the DamageCause why the player died
      Returns:
      DamageCause why the player died
    • getHandlers

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

      public static HandlerList getHandlerList()
    • isCancelled

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

      public void setCancelled(boolean cancel)
      Whether or not this event should be cancelled. If cancelled, the chest will not be spawned
      Specified by:
      setCancelled in interface Cancellable
      Parameters:
      cancel - Whether or not AngelChest should handle this player's death