diff options
| author | Krakenied <Krakenied1@gmail.com> | 2022-08-23 05:21:30 +0200 |
|---|---|---|
| committer | Krakenied <Krakenied1@gmail.com> | 2022-08-23 05:21:30 +0200 |
| commit | 41f005443e00760e8fc9187fea665974a2d0a6bc (patch) | |
| tree | 04646895989710580cbc0116def3f00d02c6847e /bukkit/src/main/java | |
| parent | 826da674adc55748d85623af1fab5d4e327df732 (diff) | |
Get task amount needed after checking the item
Diffstat (limited to 'bukkit/src/main/java')
| -rw-r--r-- | bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/type/CraftingTaskType.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/type/CraftingTaskType.java b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/type/CraftingTaskType.java index 6a6c3dd5..d764640e 100644 --- a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/type/CraftingTaskType.java +++ b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/type/CraftingTaskType.java @@ -85,8 +85,6 @@ public final class CraftingTaskType extends BukkitTaskType { Task task = pendingTask.task(); TaskProgress taskProgress = pendingTask.taskProgress(); - int amount = (int) task.getConfigValue("amount"); - QuestItem qi; if ((qi = fixedQuestItemCache.get(quest.getId(), task.getId())) == null) { QuestItem fetchedItem = TaskUtils.getConfigQuestItem(task, "item", "data"); @@ -101,6 +99,8 @@ public final class CraftingTaskType extends BukkitTaskType { continue; } + int amount = (int) task.getConfigValue("amount"); + int progress = TaskUtils.getIntegerTaskProgress(taskProgress); taskProgress.setProgress(progress + eventAmount); super.debug("Updating task progress (now " + (progress + eventAmount) + ")", quest.getId(), task.getId(), player.getUniqueId()); |
