Class QuestProgressEvent
java.lang.Object
org.bukkit.event.Event
com.ordwen.odailyquests.api.events.QuestProgressEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class QuestProgressEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Called when a quest progress.
This method advances the player's quest by the amount indicated.
It first checks that the player is not in a world prohibited by the configuration.
- Since:
- 2.2.4
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionQuestProgressEvent
(org.bukkit.entity.Player player, Progression progression, AbstractQuest quest, int amount) Constructor for the QuestProgressEvent. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the amount of progression.static org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
org.bukkit.entity.Player
Get the player who progressed the quest.Get the current progression of the quest.getQuest()
Get the quest that was progressed.boolean
void
setCancelled
(boolean isCancelled) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
QuestProgressEvent
public QuestProgressEvent(org.bukkit.entity.Player player, Progression progression, AbstractQuest quest, int amount) Constructor for the QuestProgressEvent.- Parameters:
player
- player who progressed the questprogression
- current progression of the questquest
- quest that was progressedamount
- amount of progression
-
-
Method Details
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean isCancelled) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
getPlayer
public org.bukkit.entity.Player getPlayer()Get the player who progressed the quest.- Returns:
- Player object
-
getProgression
Get the current progression of the quest.- Returns:
- Progression object
-
getQuest
Get the quest that was progressed.- Returns:
- AbstractQuest object
-
getAmount
public int getAmount()Get the amount of progression.- Returns:
- int
-