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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Field Summary
Fields inherited from class de.erethon.dungeonsxl.api.event.requirement.RequirementEvent
dungeon, requirement
-
Constructor Summary
ConstructorsConstructorDescriptionRequirementDemandEvent(Requirement requirement, Dungeon dungeon, org.bukkit.entity.Player player, boolean keepInventory)
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
org.bukkit.entity.Player
Returns the player who pays the requirement.boolean
boolean
If the player's state - including his inventory, EXP etc. - is kept.void
setCancelled(boolean cancelled)
void
setPlayer(org.bukkit.entity.Player player)
Sets the player who pays the requirement.toString()
Methods inherited from class de.erethon.dungeonsxl.api.event.requirement.RequirementEvent
getDungeon, getRequirement, setRequirement
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
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 classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled)- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
toString
-