9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-27 02:49:08 +00:00

null check on cosmetic armor type

This commit is contained in:
LoJoSho
2023-01-13 16:51:10 -06:00
parent 98f046eb22
commit 6bf7b9fc74

View File

@@ -23,6 +23,7 @@ public class CosmeticArmorType extends Cosmetic {
@Override
public void update(CosmeticUser user) {
Player player = Bukkit.getPlayer(user.getUniqueId());
if (player == null) return;
if (equipSlot.equals(EquipmentSlot.OFF_HAND)) {
if (!player.getInventory().getItemInOffHand().getType().isAir()) return;
}