From 40d09ae8086e36feff2d4e9ca47da1bbcc841936 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 13 Jun 2020 20:56:29 +1000 Subject: [PATCH] SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot. By: blablubbabc --- .../org/bukkit/inventory/EntityEquipment.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/inventory/EntityEquipment.java b/paper-api/src/main/java/org/bukkit/inventory/EntityEquipment.java index 1fd9f79de8..dfed22918d 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/EntityEquipment.java +++ b/paper-api/src/main/java/org/bukkit/inventory/EntityEquipment.java @@ -9,6 +9,23 @@ import org.jetbrains.annotations.Nullable; */ public interface EntityEquipment { + /** + * Stores the ItemStack at the given equipment slot in the inventory. + * + * @param slot the slot to put the ItemStack + * @param item the ItemStack to set + */ + public void setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item); + + /** + * Gets the ItemStack at the given equipment slot in the inventory. + * + * @param slot the slot to get the ItemStack + * @return the ItemStack in the given slot + */ + @NotNull + public ItemStack getItem(@NotNull EquipmentSlot slot); + /** * Gets a copy of the item the entity is currently holding * in their main hand.