diff --git a/Plugin/src/main/java/me/filoghost/chestcommands/menu/AdvancedIconMenu.java b/Plugin/src/main/java/me/filoghost/chestcommands/menu/AdvancedIconMenu.java index aa8fcdf..33639af 100644 --- a/Plugin/src/main/java/me/filoghost/chestcommands/menu/AdvancedIconMenu.java +++ b/Plugin/src/main/java/me/filoghost/chestcommands/menu/AdvancedIconMenu.java @@ -92,6 +92,9 @@ public class AdvancedIconMenu extends BaseIconMenu { public void refresh(Player player, Inventory inventory) { for (int i = 0; i < inventoryGrid.getSize(); i++) { AdvancedIcon icon = inventoryGrid.getElementAtIndex(i); + if (icon == null) { + continue; + } if (icon.hasViewPermission() || icon.hasVariables()) { // Then we have to refresh it