Class PlayerProgressor
java.lang.Object
com.ordwen.odailyquests.quests.player.progression.PlayerProgressor
- Direct Known Subclasses:
AbstractQuest
,BlockBreakListener
,BlockDropItemListener
,BlockPlaceListener
,BucketFillListener
,ClickableChecker
,CraftItemListener
,CrateOpenListener
,CropBreakListener
,CustomBlockBreakListener
,CustomFurnaceExtractListener
,EliteMobDeathListener
,EnchantItemListener
,EntityBreedListener
,EntityDeathListener
,EntityTameListener
,FishingLootSpawnListener
,FurnaceExtractListener
,MythicMobDeathListener
,PickupItemListener
,PlayerExpChangeListener
,PlayerFishListener
,PlayerHarvestBlockListener
,PlayerInteractListener
,PlayerItemConsumeListener
,PlayerLevelChangeListener
,PlayerRespawnListener
,ProjectileHitListener
,ProjectileLaunchListener
,RoseStackerListener
,ShearEntityListener
,SmithItemListener
,VotifierListener
,WildStackerListener
Manages the progression of a player's quests.
This class provides methods to track and update the progression of quests for players, including checking progress, executing actions when a quest is completed, and handling various conditions like world, region, and permissions for progression.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
actionQuest
(org.bukkit.entity.Player player, Progression progression, AbstractQuest quest, int amount) Raises the QuestProgressEvent event and determines whether to perform progress based on the event result.int
fits
(org.bukkit.inventory.ItemStack stack, org.bukkit.inventory.ItemStack[] contents) boolean
isAllowedToProgress
(org.bukkit.entity.Player player, AbstractQuest quest) Execute all the checks to determine if the player is allowed to progress in the quest.boolean
movingItem
(org.bukkit.inventory.ItemStack result, int recipeAmount, org.bukkit.entity.Player player, org.bukkit.event.inventory.ClickType click) Checks if the player is moving an item.void
setPlayerQuestProgression
(org.bukkit.event.Event event, org.bukkit.entity.Player player, int amount, String questType) Set the player's progression for a specific quest type
-
Constructor Details
-
PlayerProgressor
public PlayerProgressor()
-
-
Method Details
-
setPlayerQuestProgression
public void setPlayerQuestProgression(org.bukkit.event.Event event, org.bukkit.entity.Player player, int amount, String questType) Set the player's progression for a specific quest type- Parameters:
player
- the player to set the progression foramount
- the amount to set the progression toquestType
- the quest type to set the progression for
-
actionQuest
public void actionQuest(org.bukkit.entity.Player player, Progression progression, AbstractQuest quest, int amount) Raises the QuestProgressEvent event and determines whether to perform progress based on the event result.- Parameters:
player
- involved playerprogression
- player's progressionquest
- quest to be progressedamount
- amount of progression
-
isAllowedToProgress
Execute all the checks to determine if the player is allowed to progress in the quest. This includes checking if the player is in the required world and region.- Parameters:
player
- the player to check.quest
- the quest to check.- Returns:
- true if the player is allowed to progress.
-
fits
public int fits(org.bukkit.inventory.ItemStack stack, org.bukkit.inventory.ItemStack[] contents) - Parameters:
stack
- the item to check.contents
- the inventory contents to compare.- Returns:
- the amount of items that can be added to the inventory.
-
movingItem
public boolean movingItem(org.bukkit.inventory.ItemStack result, int recipeAmount, org.bukkit.entity.Player player, org.bukkit.event.inventory.ClickType click) Checks if the player is moving an item.- Parameters:
result
- the result item.recipeAmount
- the amount of items in the recipe.player
- the player to check.click
- the click type.- Returns:
- true if the player is moving an item.
-