Fix equipment slot and group API

Adds the following:
- Add missing 'body' slot group
- Expose LivingEntity#canUseSlot

Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
This commit is contained in:
Jake Potrebic
2024-05-22 10:00:19 -07:00
parent 953ba33fc1
commit 962554a0de
6 changed files with 26 additions and 3 deletions

View File

@@ -1457,4 +1457,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void setBodyYaw(float bodyYaw);
// Paper end - body yaw API
// Paper start - Expose canUseSlot
/**
* Checks whether this entity can use the equipment slot.
* <br>For example, not all entities may have {@link org.bukkit.inventory.EquipmentSlot#BODY}.
*
* @param slot equipment slot
* @return whether this entity can use the equipment slot
*/
boolean canUseEquipmentSlot(org.bukkit.inventory.@NotNull EquipmentSlot slot);
// Paper end - Expose canUseSlot
}