forked from Upstream/CommandPanels
3.15.7.0
This commit is contained in:
parent
8f6a222f15
commit
a88ffc13b4
@ -2,6 +2,7 @@ package me.rockyhawk.commandpanels.openwithitem;
|
|||||||
|
|
||||||
import me.rockyhawk.commandpanels.CommandPanels;
|
import me.rockyhawk.commandpanels.CommandPanels;
|
||||||
import me.rockyhawk.commandpanels.api.Panel;
|
import me.rockyhawk.commandpanels.api.Panel;
|
||||||
|
import org.apache.commons.lang.ObjectUtils;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
@ -63,9 +64,13 @@ public class HotbarItemLoader {
|
|||||||
|
|
||||||
//return true if found
|
//return true if found
|
||||||
public boolean itemCheckExecute(ItemStack invItem, Player p, boolean openPanel, boolean stationaryOnly){
|
public boolean itemCheckExecute(ItemStack invItem, Player p, boolean openPanel, boolean stationaryOnly){
|
||||||
|
try {
|
||||||
if (plugin.nbt.getNBT(invItem, "CommandPanelsHotbar") == null) {
|
if (plugin.nbt.getNBT(invItem, "CommandPanelsHotbar") == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}catch(NullPointerException nu){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
for(Panel panel : plugin.panelList) {
|
for(Panel panel : plugin.panelList) {
|
||||||
if(stationaryOnly){
|
if(stationaryOnly){
|
||||||
if(!panel.getConfig().contains("open-with-item.stationary")){
|
if(!panel.getConfig().contains("open-with-item.stationary")){
|
||||||
|
Loading…
Reference in New Issue
Block a user