Is your feature request related to a problem?
I needed to make a skeleton stretch its bow before invoking ProjectileSource#launchProjectile(). I analyzed the Bukkit API, but there doesn't seem to be a method for this purpose (or am I mistaken?). In NMS (Mojang Mappings), there's the LivingEntity#startUsingItem(InteractionHand) method - that's the solution.
Describe the solution you'd like.
Implement these methods to the Bukkit LivingEntity class:
public void startUsingItem(EquipmentSlot slot) {
if(slot == EquipmentSlot.HAND) getHandle().startUsingItem(InteractionHand.MAIN_HAND);
else if(slot == EquipmentSlot.OFF_HAND) getHandle().startUsingItem(InteractionHand.OFF_HAND);
}
public void stopUsingItem() {
getHandle().stopUsingItem();
}
Describe alternatives you've considered.
Direct use of NMS.
Other
No response
Is your feature request related to a problem?
I needed to make a skeleton stretch its bow before invoking ProjectileSource#launchProjectile(). I analyzed the Bukkit API, but there doesn't seem to be a method for this purpose (or am I mistaken?). In NMS (Mojang Mappings), there's the LivingEntity#startUsingItem(InteractionHand) method - that's the solution.
Describe the solution you'd like.
Implement these methods to the Bukkit LivingEntity class:
public void startUsingItem(EquipmentSlot slot) {
if(slot == EquipmentSlot.HAND) getHandle().startUsingItem(InteractionHand.MAIN_HAND);
else if(slot == EquipmentSlot.OFF_HAND) getHandle().startUsingItem(InteractionHand.OFF_HAND);
}
public void stopUsingItem() {
getHandle().stopUsingItem();
}
Describe alternatives you've considered.
Direct use of NMS.
Other
No response