From 9321d665f533bf15714bb29ab5d06e8803bb814c Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 30 Mar 2024 12:54:23 +1100 Subject: [PATCH] Move getItemInUse up to LivingEntity --- src/main/java/org/bukkit/entity/HumanEntity.java | 10 ---------- src/main/java/org/bukkit/entity/LivingEntity.java | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java index 09936f3a..fffc4783 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -317,16 +317,6 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public boolean isHandRaised(); - /** - * Gets the item that the player is using (eating food, drawing back a bow, - * blocking, etc.) - * - * @return the item being used by the player, or null if they are not using - * an item - */ - @Nullable - public ItemStack getItemInUse(); - /** * Get the total amount of experience required for the player to level * diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java index 05af43a1..67632eae 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -196,6 +196,16 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource */ public void setMaximumAir(int ticks); + /** + * Gets the item that the player is using (eating food, drawing back a bow, + * blocking, etc.) + * + * @return the item being used by the player, or null if they are not using + * an item + */ + @Nullable + public ItemStack getItemInUse(); + /** * Gets the number of ticks remaining for the current item's usage. *