9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-29 20:09:13 +00:00

fix: balloons and backpacks being respawned while in wardrobe

This commit is contained in:
LoJoSho
2023-12-20 15:38:32 -06:00
parent ebf09d8e0f
commit dcf072f3de

View File

@@ -125,7 +125,7 @@ public class PlayerGameListener implements Listener {
}
Bukkit.getScheduler().runTaskLater(HMCCosmeticsPlugin.getInstance(), () -> {
if (user.getEntity() == null) return; // fixes disconnecting when in wardrobe
if (user.getEntity() == null || user.isInWardrobe()) return; // fixes disconnecting when in wardrobe (the entity stuff)
if (user.hasCosmeticInSlot(CosmeticSlot.BACKPACK) && user.getUserBackpackManager() != null) {
user.respawnBackpack();
}