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

fix: cosmetic armor updating when a player is emoting

This commit is contained in:
LoJoSho
2023-05-16 14:17:41 -05:00
parent 7a13715897
commit e2ee55bab4

View File

@@ -28,6 +28,7 @@ public class CosmeticArmorType extends Cosmetic {
public void update(@NotNull CosmeticUser user) {
Player player = Bukkit.getPlayer(user.getUniqueId());
if (player == null) return;
if (user.getUserEmoteManager().isPlayingEmote()) return; // There has to be a better way of doing this...
ItemStack cosmeticItem = user.getUserCosmeticItem(this);
if (equipSlot.equals(EquipmentSlot.OFF_HAND)) {
if (!player.getInventory().getItemInOffHand().getType().isAir()) return;