9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-29 11:59:21 +00:00

fix: pose changes in wardrobe causes backpack being unattached

This commit is contained in:
LoJoSho
2024-01-03 12:38:17 -06:00
parent 1737330b87
commit 5522eed2d1

View File

@@ -212,11 +212,11 @@ public class PlayerGameListener implements Listener {
user.updateCosmetic(CosmeticSlot.BALLOON);
}
@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerPoseChange(EntityPoseChangeEvent event) {
if (!(event.getEntity() instanceof Player player)) return;
CosmeticUser user = CosmeticUsers.getUser(player);
if (user == null) return;
if (user == null || user.isInWardrobe()) return;
if (!user.hasCosmeticInSlot(CosmeticSlot.BACKPACK)) return;
Pose pose = event.getPose();
if (pose.equals(Pose.STANDING)) {