public class QuestProcessor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private org.bukkit.entity.Player |
player
The player who is doing the quest.
|
private WauzQuest |
quest
The quest of the player;
|
private java.lang.String |
questName
The name of the quest.
|
private int |
questPhase
The current phase of the quest.
|
private int |
questPhaseAmount
The total amount of quest phases.
|
private java.lang.String |
questSlot
The slot of the quest.
|
private java.lang.String |
questType
The type of the quest;
|
Modifier | Constructor and Description |
---|---|
private |
QuestProcessor(org.bukkit.entity.Player player,
java.lang.String questName)
Create a quest processor to manage the progression of a player's quest.
|
Modifier and Type | Method and Description |
---|---|
private void |
acceptQuest()
Lets the player accept the quest.
|
private boolean |
checkQuestCompletion()
Determines if the quest cannot be repeated right now.
|
private boolean |
checkQuestObjectives()
Determines if all objectives of the quest phase are fulfilled.
|
private boolean |
checkQuestSlots()
Determines the quest slot to use.
|
private void |
completeQuestStep()
Starts the next quest phase or completes the quest.
|
static void |
processQuest(org.bukkit.entity.Player player,
java.lang.String questName)
Tries to accept or continue the quest.
|
private void |
run()
Tries to accept or continue the quest.
|
private final org.bukkit.entity.Player player
private final WauzQuest quest
private final java.lang.String questName
private final java.lang.String questType
private int questPhase
private final int questPhaseAmount
private java.lang.String questSlot
private QuestProcessor(org.bukkit.entity.Player player, java.lang.String questName)
player
- The player who is doing the quest.questName
- The name of the quest.public static void processQuest(org.bukkit.entity.Player player, java.lang.String questName)
player
- The player who is doing the quest.questName
- The name of the quest.The internal logic.
private void run()
private boolean checkQuestSlots()
PlayerConfigurator.getCharacterRunningMainQuest(Player)
private boolean checkQuestCompletion()
PlayerQuestConfigurator.getQuestCooldown(Player, String)
,
PlayerQuestConfigurator.isQuestCompleted(Player, String)
,
WauzQuest.getCompletedDialog()
private boolean checkQuestObjectives()
QuestRequirementChecker.checkRequirements()
,
WauzQuest.getUncompletedMessage(int)
private void acceptQuest()
WauzPlayerEventQuestAccept
private void completeQuestStep()