Class RequirementCheckEvent
java.lang.Object
org.bukkit.event.Event
de.erethon.dungeonsxl.api.event.requirement.RequirementEvent
de.erethon.dungeonsxl.api.event.requirement.RequirementCheckEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
Fired when it is checked if a player fulfills a
Requirement
realized through the Requirement API.
Note that this is usually called twice per player: When he tries to enter a dungeon and when he tries to start a game.
- 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
ConstructorsConstructorDescriptionRequirementCheckEvent(Requirement requirement, Dungeon dungeon, org.bukkit.entity.Player player, boolean keepInventory)
-
Method Summary
Modifier and TypeMethodDescriptionnet.md_5.bungee.api.chat.BaseComponent[]
Returns the message that will be sent to the player to inform him what he needs in order to fulfill the requirement if there is a requirement that he does not fulfill.static org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
org.bukkit.entity.Player
Returns the checked player.boolean
boolean
If the player's state - including his inventory, EXP etc. - is kept.void
setCancelled(boolean cancelled)
void
setCheckMessage(net.md_5.bungee.api.chat.BaseComponent[] checkMessage)
Sets the message that will be sent to the player to inform him what he needs in order to fulfill the requirement if there is a a requirement that he does not fulfill.void
setPlayer(org.bukkit.entity.Player player)
Sets the checked player.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
-
RequirementCheckEvent
public RequirementCheckEvent(Requirement requirement, Dungeon dungeon, org.bukkit.entity.Player player, boolean keepInventory)
-
-
Method Details
-
getPlayer
public org.bukkit.entity.Player getPlayer()Returns the checked player.- Returns:
- the player
-
setPlayer
public void setPlayer(org.bukkit.entity.Player player)Sets the checked player.- Parameters:
player
- the player
-
getCheckMessage
public net.md_5.bungee.api.chat.BaseComponent[] getCheckMessage()Returns the message that will be sent to the player to inform him what he needs in order to fulfill the requirement if there is a requirement that he does not fulfill.- Returns:
- the message that will be sent to the player to inform him what he needs in order to fulfill the requirement if there is a requirement that he does not fulfill
-
setCheckMessage
public void setCheckMessage(net.md_5.bungee.api.chat.BaseComponent[] checkMessage)Sets the message that will be sent to the player to inform him what he needs in order to fulfill the requirement if there is a a requirement that he does not fulfill.- Parameters:
checkMessage
- the message component array
-
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
-