diff --git a/src/main/java/org/maxgamer/quickshop/Listeners/PlayerListener.java b/src/main/java/org/maxgamer/quickshop/Listeners/PlayerListener.java index 0da7e04c0..ae5f579ec 100644 --- a/src/main/java/org/maxgamer/quickshop/Listeners/PlayerListener.java +++ b/src/main/java/org/maxgamer/quickshop/Listeners/PlayerListener.java @@ -204,21 +204,25 @@ public class PlayerListener implements Listener { @EventHandler public void onInventoryClose(InventoryCloseEvent e) { - final Inventory inventory = e.getInventory(); - if (inventory == null) { - return; + try { + final Inventory inventory = e.getInventory(); + if (inventory == null) { + return; + } + + final Location location = inventory.getLocation(); + if (location == null) { + return; + } + + final Shop shop = plugin.getShopManager().getShop(location); + if (shop == null) { + return; + } + + shop.setSignText(); + } catch (Throwable t) { + } - - final Location location = inventory.getLocation(); - if (location == null) { - return; - } - - final Shop shop = plugin.getShopManager().getShop(location); - if (shop == null) { - return; - } - - shop.setSignText(); } }