diff --git a/core/src/main/java/me/pikamug/quests/commands/questadmin/subcommands/BukkitQuestadminNextstageCommand.java b/core/src/main/java/me/pikamug/quests/commands/questadmin/subcommands/BukkitQuestadminNextstageCommand.java index a1a1f6c03..85044a6cf 100644 --- a/core/src/main/java/me/pikamug/quests/commands/questadmin/subcommands/BukkitQuestadminNextstageCommand.java +++ b/core/src/main/java/me/pikamug/quests/commands/questadmin/subcommands/BukkitQuestadminNextstageCommand.java @@ -68,7 +68,6 @@ public class BukkitQuestadminNextstageCommand extends BukkitQuestsSubCommand { @Override public void execute(CommandSender cs, String[] args) { if (args.length < 3) { - System.out.println(args.length); // Shows command usage return; } diff --git a/core/src/main/java/me/pikamug/quests/listeners/BukkitItemListener.java b/core/src/main/java/me/pikamug/quests/listeners/BukkitItemListener.java index e3aa606b6..79be83a0f 100644 --- a/core/src/main/java/me/pikamug/quests/listeners/BukkitItemListener.java +++ b/core/src/main/java/me/pikamug/quests/listeners/BukkitItemListener.java @@ -64,11 +64,10 @@ public class BukkitItemListener implements Listener { if (!quester.meetsCondition(quest, true)) { continue; } - if (quester.getCurrentQuests().containsKey(quest) && quester.getCurrentStage(quest).containsObjective(type)) { - if (BukkitInventoryUtil.getEmptySlots(player) - < craftedItem.getAmount() / craftedItem.getMaxStackSize()) { + if (craftedItem.getMaxStackSize() == 0 || (BukkitInventoryUtil.getEmptySlots(player) + < craftedItem.getAmount() / craftedItem.getMaxStackSize())) { BukkitActionBarProvider.sendActionBar(player, ChatColor.RED + BukkitLang.get(player, "inventoryFull")); event.setCancelled(true); diff --git a/core/src/main/java/me/pikamug/quests/util/BukkitItemUtil.java b/core/src/main/java/me/pikamug/quests/util/BukkitItemUtil.java index 890232f71..d58d99ddb 100644 --- a/core/src/main/java/me/pikamug/quests/util/BukkitItemUtil.java +++ b/core/src/main/java/me/pikamug/quests/util/BukkitItemUtil.java @@ -77,7 +77,7 @@ public class BukkitItemUtil { * -6 if stack stored enchants are unequal
* -7 if stack item flags are unequal
* -8 if stack Written Book data is unequal
- * -9 if stack Potion type is unequal
+ * -9 if stack Potion or Tipped Arrow type are unequal
* -10 if stack Tropical Fish variant is unequal */ public static int compareItems(final ItemStack one, final ItemStack two, final boolean ignoreAmount, @@ -181,6 +181,14 @@ public class BukkitItemUtil { return -9; } } + } else { + if (one.getType().name().equals("TIPPED_ARROW") && two.getType().name().equals("TIPPED_ARROW")) { + final String levelA = BukkitItemUtil.getPrettyPotionLevel(one.getItemMeta()); + final String levelB = BukkitItemUtil.getPrettyPotionLevel(two.getItemMeta()); + if (!levelA.equals(levelB)) { + return -9; + } + } } if (!one.getEnchantments().equals(two.getEnchantments())) { return -5;