mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-31 12:56:39 +00:00
offhand does not override existing item
This commit is contained in:
@@ -23,6 +23,9 @@ public class CosmeticArmorType extends Cosmetic {
|
||||
@Override
|
||||
public void update(CosmeticUser user) {
|
||||
Player player = Bukkit.getPlayer(user.getUniqueId());
|
||||
if (equipSlot.equals(EquipmentSlot.OFF_HAND)) {
|
||||
if (!player.getInventory().getItemInOffHand().getType().isAir()) return;
|
||||
}
|
||||
PacketManager.equipmentSlotUpdate(player, getSlot(), PacketManager.getViewers(player.getLocation()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user