From a88ffc13b459b0cea749cf31db2ed07e06392498 Mon Sep 17 00:00:00 2001 From: rockyhawk64 Date: Sun, 4 Jul 2021 09:58:13 +1000 Subject: [PATCH] 3.15.7.0 --- .../commandpanels/openwithitem/HotbarItemLoader.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/me/rockyhawk/commandpanels/openwithitem/HotbarItemLoader.java b/src/me/rockyhawk/commandpanels/openwithitem/HotbarItemLoader.java index d86326d..4940128 100644 --- a/src/me/rockyhawk/commandpanels/openwithitem/HotbarItemLoader.java +++ b/src/me/rockyhawk/commandpanels/openwithitem/HotbarItemLoader.java @@ -2,6 +2,7 @@ package me.rockyhawk.commandpanels.openwithitem; import me.rockyhawk.commandpanels.CommandPanels; import me.rockyhawk.commandpanels.api.Panel; +import org.apache.commons.lang.ObjectUtils; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; @@ -63,7 +64,11 @@ public class HotbarItemLoader { //return true if found public boolean itemCheckExecute(ItemStack invItem, Player p, boolean openPanel, boolean stationaryOnly){ - if(plugin.nbt.getNBT(invItem,"CommandPanelsHotbar") == null){ + try { + if (plugin.nbt.getNBT(invItem, "CommandPanelsHotbar") == null) { + return false; + } + }catch(NullPointerException nu){ return false; } for(Panel panel : plugin.panelList) {