9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-29 03:49:19 +00:00

fix: player dying causing NPE

This commit is contained in:
LoJoSho
2024-01-06 11:09:21 -06:00
parent 9a75fcb55b
commit ce7dc03350

View File

@@ -203,7 +203,7 @@ public class CosmeticUser {
}
updateCosmetic(cosmetic.getSlot());
}
if (items.isEmpty()) return;
if (items.isEmpty() || getEntity() == null) return;
PacketManager.equipmentSlotUpdate(getEntity().getEntityId(), items, HMCCPlayerUtils.getNearbyPlayers(getEntity().getLocation()));
MessagesUtil.sendDebugMessages("updateCosmetic (All) - end - " + items.size());
}