diff --git a/pom.xml b/pom.xml index 4a401fa1f..45cf73953 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ me.blackvein.quests quests - 2.7.4 + 2.7.5 quests https://github.com/FlyingPikachu/Quests/ jar diff --git a/src/main/java/me/blackvein/quests/util/ItemUtil.java b/src/main/java/me/blackvein/quests/util/ItemUtil.java index a8a0c556b..4971f2a99 100644 --- a/src/main/java/me/blackvein/quests/util/ItemUtil.java +++ b/src/main/java/me/blackvein/quests/util/ItemUtil.java @@ -7,6 +7,7 @@ import me.blackvein.quests.Quester; import me.blackvein.quests.Quests; import net.milkbowl.vault.item.Items; +import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; @@ -212,12 +213,17 @@ public class ItemUtil implements ColorUtil { public static String getName(ItemStack is) { - String text; + String text = ""; if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) { text = "" + DARKAQUA + ITALIC + is.getItemMeta().getDisplayName(); } else { - text = AQUA + Items.itemByStack(is).getName(); + try { + text = AQUA + Items.itemByStack(is).getName(); + } catch (NullPointerException ne) { + Bukkit.getLogger().severe("This error is caused by an incompatible version of Vault. Please update!"); + ne.printStackTrace(); + } } return text;