Fix equipment slot and group API

Adds the following:
- Add test for EquipmentSlotGroup
- Expose LivingEntity#canUseSlot

Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
This commit is contained in:
Jake Potrebic
2024-05-22 10:01:19 -07:00
parent 5d843f3120
commit e1b7819229
4 changed files with 70 additions and 4 deletions

View File

@@ -1230,4 +1230,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.getHandle().setYBodyRot(bodyYaw);
}
// Paper end - body yaw API
// Paper start - Expose canUseSlot
@Override
public boolean canUseEquipmentSlot(org.bukkit.inventory.EquipmentSlot slot) {
return this.getHandle().canUseSlot(org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot));
}
// Paper end - Expose canUseSlot
}