From 83ef4e849e4ae67e6030119fff0687c6d06153ac Mon Sep 17 00:00:00 2001 From: BuildTools Date: Tue, 20 Nov 2018 20:37:16 -0500 Subject: [PATCH] Prevent certain quests throwing error when taken, fixes #530 --- src/main/java/me/blackvein/quests/Quester.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/blackvein/quests/Quester.java b/src/main/java/me/blackvein/quests/Quester.java index b9b04da37..cdf8ffa08 100644 --- a/src/main/java/me/blackvein/quests/Quester.java +++ b/src/main/java/me/blackvein/quests/Quester.java @@ -430,18 +430,18 @@ public class Quester { Material m = Material.matchMaterial(serial); Enchantment e = Enchantment.getByName(Lang.getKey(enchant).replace("ENCHANTMENT_", "")); plugin.query.sendMessage(player, s.replace(serial, "").replace(enchant, ""), m, e); + continue; } else if (Material.matchMaterial(serial) != null) { Material m = Material.matchMaterial(serial); plugin.query.sendMessage(player, s.replace(serial, ""), m); - } else if (EntityType.valueOf(serial.toUpperCase().replace(" ", "_")) != null) { + continue; + } else { try { EntityType type = EntityType.valueOf(serial.toUpperCase().replace(" ", "_")); plugin.query.sendMessage(player, s.replace(serial, ""), type); } catch (IllegalArgumentException e) { player.sendMessage(s); } - } else { - player.sendMessage(s); } } catch (IndexOutOfBoundsException e) { player.sendMessage(s);