aboutsummaryrefslogtreecommitdiffstats
path: root/bukkit/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'bukkit/src/main')
-rw-r--r--bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/type/CraftingTaskType.java4
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());