handle BODY slot for non-mobs (#10822)
This commit is contained in:
@@ -182,6 +182,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @param slot the equipment slot to get
|
||||
+ * @return the ItemStack in the equipment slot
|
||||
+ * @throws IllegalArgumentException if the slot is invalid for the entity
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ ItemStack getItem(@NotNull final org.bukkit.inventory.EquipmentSlot slot);
|
||||
@@ -192,6 +193,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @param slot the equipment slot to set
|
||||
+ * @param item the item to hold
|
||||
+ * @throws IllegalArgumentException if the slot is invalid for the entity
|
||||
+ */
|
||||
+ void setItem(@NotNull final org.bukkit.inventory.EquipmentSlot slot, @Nullable final ItemStack item);
|
||||
+
|
||||
|
||||
@@ -17,6 +17,36 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public EquipmentSlot getSlot() {
|
||||
return slot == EquipmentSlotGroup.ANY ? null : slot.getExample();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/EntityEquipment.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/EntityEquipment.java
|
||||
@@ -0,0 +0,0 @@ public interface EntityEquipment {
|
||||
*
|
||||
* @param slot the slot to put the ItemStack
|
||||
* @param item the ItemStack to set
|
||||
+ * @throws IllegalArgumentException if the slot is invalid for the entity
|
||||
*/
|
||||
public void setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item);
|
||||
|
||||
@@ -0,0 +0,0 @@ public interface EntityEquipment {
|
||||
*
|
||||
* @param slot the slot to put the ItemStack
|
||||
* @param item the ItemStack to set
|
||||
- * @param silent whether or not the equip sound should be silenced
|
||||
+ * @param silent whether the equip sound should be silenced
|
||||
+ * @throws IllegalArgumentException if the slot is invalid for the entity
|
||||
*/
|
||||
public void setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item, boolean silent);
|
||||
|
||||
@@ -0,0 +0,0 @@ public interface EntityEquipment {
|
||||
*
|
||||
* @param slot the slot to get the ItemStack
|
||||
* @return the ItemStack in the given slot
|
||||
+ * @throws IllegalArgumentException if the slot is invalid for the entity
|
||||
*/
|
||||
@NotNull
|
||||
public ItemStack getItem(@NotNull EquipmentSlot slot);
|
||||
diff --git a/src/main/java/org/bukkit/inventory/EquipmentSlotGroup.java b/src/main/java/org/bukkit/inventory/EquipmentSlotGroup.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/EquipmentSlotGroup.java
|
||||
|
||||
Reference in New Issue
Block a user