From 1379ce344a97a7c844276091312a98ec0a6f1a8e Mon Sep 17 00:00:00 2001 From: filoghost Date: Sun, 12 Jul 2020 10:54:12 +0200 Subject: [PATCH] Fix NullPointerException --- .../main/java/me/filoghost/chestcommands/menu/BaseIconMenu.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugin/src/main/java/me/filoghost/chestcommands/menu/BaseIconMenu.java b/Plugin/src/main/java/me/filoghost/chestcommands/menu/BaseIconMenu.java index 4b24ad7..798905e 100644 --- a/Plugin/src/main/java/me/filoghost/chestcommands/menu/BaseIconMenu.java +++ b/Plugin/src/main/java/me/filoghost/chestcommands/menu/BaseIconMenu.java @@ -78,7 +78,7 @@ public abstract class BaseIconMenu implements IconMenu { public void refreshOpenInventories() { for (Player player : Bukkit.getOnlinePlayers()) { DefaultItemInventory itemInventory = MenuManager.getOpenItemInventory(player); - if (itemInventory.getIconMenu() == this) { + if (itemInventory != null && itemInventory.getIconMenu() == this) { itemInventory.refresh(); } }