diff options
Diffstat (limited to 'bukkit')
| -rw-r--r-- | bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/type/TradingTaskType.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/type/TradingTaskType.java b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/type/TradingTaskType.java index 09eeaa59..6fd4440c 100644 --- a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/type/TradingTaskType.java +++ b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/type/TradingTaskType.java @@ -104,7 +104,7 @@ public final class TradingTaskType extends BukkitTaskType { } } - if (task.hasConfigKey("first-ingredient")) { + if (firstIngredient != null && task.hasConfigKey("first-ingredient")) { QuestItem qi; if ((qi = fixedQuestFirstIngredientCache.get(quest.getId(), task.getId())) == null) { QuestItem fetchedItem = TaskUtils.getConfigQuestItem(task, "first-ingredient", "data"); @@ -112,7 +112,7 @@ public final class TradingTaskType extends BukkitTaskType { qi = fetchedItem; } - super.debug("First ingredient was of type " + (firstIngredient != null ? firstIngredient.getType() : null), quest.getId(), task.getId(), player.getUniqueId()); + super.debug("First ingredient was of type " + firstIngredient.getType(), quest.getId(), task.getId(), player.getUniqueId()); boolean exactMatch = TaskUtils.getConfigBoolean(task, "first-ingredient-exact-match", true); if (!qi.compareItemStack(firstIngredient, exactMatch)) { @@ -121,7 +121,7 @@ public final class TradingTaskType extends BukkitTaskType { } } - if (task.hasConfigKey("second-ingredient")) { + if (secondIngredient != null && task.hasConfigKey("second-ingredient")) { QuestItem qi; if ((qi = fixedQuestSecondIngredientCache.get(quest.getId(), task.getId())) == null) { QuestItem fetchedItem = TaskUtils.getConfigQuestItem(task, "second-ingredient", "data"); @@ -129,7 +129,7 @@ public final class TradingTaskType extends BukkitTaskType { qi = fetchedItem; } - super.debug("Second ingredient was of type " + (secondIngredient != null ? secondIngredient.getType() : null), quest.getId(), task.getId(), player.getUniqueId()); + super.debug("Second ingredient was of type " + secondIngredient.getType(), quest.getId(), task.getId(), player.getUniqueId()); boolean exactMatch = TaskUtils.getConfigBoolean(task, "second-ingredient-exact-match", true); if (!qi.compareItemStack(secondIngredient, exactMatch)) { |
