mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-26 18:39:07 +00:00
item null check
This commit is contained in:
@@ -59,7 +59,9 @@ public class PlayerGameListener implements Listener {
|
||||
//if (event.getSlotType() != InventoryType.SlotType.ARMOR) return;
|
||||
CosmeticUser user = CosmeticUsers.getUser(event.getWhoClicked().getUniqueId());
|
||||
if (user == null) return;
|
||||
EquipmentSlot slot = getArmorSlot(event.getCurrentItem().getType());
|
||||
ItemStack item = event.getCurrentItem();
|
||||
if (item == null) return;
|
||||
EquipmentSlot slot = getArmorSlot(item.getType());
|
||||
if (slot == null) return;
|
||||
CosmeticSlot cosmeticSlot = InventoryUtils.BukkitCosmeticSlot(slot);
|
||||
if (cosmeticSlot == null) return;
|
||||
|
||||
Reference in New Issue
Block a user