From 112f34c77f8c581966abcf725346d7e05ae4e39f Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Wed, 21 Oct 2015 08:10:53 +0100 Subject: [PATCH] Fixed NullPointerException when clicking outside of inventory GUI. --- .../src/mineplex/game/clans/spawn/travel/TravelShop.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/travel/TravelShop.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/travel/TravelShop.java index 9004e143b..dffdd6ce2 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/travel/TravelShop.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/travel/TravelShop.java @@ -52,7 +52,7 @@ public class TravelShop extends ShopBase public void onInventoryClickedd(InventoryClickEvent event) { ItemStack item = event.getCurrentItem(); - if (item.getItemMeta() == null || item.getItemMeta().getDisplayName() == null) return; + if (item == null || item.getItemMeta() == null || item.getItemMeta().getDisplayName() == null) return; else if (isPlayerInShop(event.getWhoClicked())) return; String displayName = event.getCurrentItem().getItemMeta().getDisplayName();