Class RequirementDemandEvent

java.lang.Object
org.bukkit.event.Event
de.erethon.dungeonsxl.api.event.requirement.RequirementEvent
de.erethon.dungeonsxl.api.event.requirement.RequirementDemandEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class RequirementDemandEvent extends RequirementEvent implements org.bukkit.event.Cancellable
Fired when a Requirement is demanded from a player.

This is fired for all requirements, even for those that do not demand anything from the player.

Author:
Daniel Saukel
  • Constructor Details

    • RequirementDemandEvent

      public RequirementDemandEvent(Requirement requirement, Dungeon dungeon, org.bukkit.entity.Player player, boolean keepInventory)
  • Method Details

    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Returns the player who pays the requirement.
      Returns:
      the player
    • setPlayer

      public void setPlayer(org.bukkit.entity.Player player)
      Sets the player who pays the requirement.
      Parameters:
      player - the player
    • isInventoryKept

      public boolean isInventoryKept()
      If the player's state - including his inventory, EXP etc. - is kept.
      Returns:
      if the player's state is kept
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • toString

      public String toString()
      Overrides:
      toString in class Object