mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-30 20:39:13 +00:00
fix: invisibility wearing off while swimming with backpack equipped causing NPE
This commit is contained in:
@@ -495,7 +495,7 @@ public class CosmeticUser {
|
||||
List<Player> viewer = PlayerUtils.getNearbyPlayers(getEntity().getLocation());
|
||||
PacketManager.sendLeashPacket(getBalloonManager().getPufferfishBalloonId(), getPlayer().getEntityId(), viewer);
|
||||
}
|
||||
if (hasCosmeticInSlot(CosmeticSlot.BACKPACK)) {
|
||||
if (hasCosmeticInSlot(CosmeticSlot.BACKPACK) && isBackpackSpawned()) {
|
||||
CosmeticBackpackType cosmeticBackpackType = (CosmeticBackpackType) getCosmetic(CosmeticSlot.BACKPACK);
|
||||
ItemStack item = getUserCosmeticItem(cosmeticBackpackType);
|
||||
userBackpackManager.setItem(item);
|
||||
|
||||
Reference in New Issue
Block a user