aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0222-Expand-ArmorStand-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0222-Expand-ArmorStand-API.patch')
-rw-r--r--patches/server/0222-Expand-ArmorStand-API.patch10
1 files changed, 6 insertions, 4 deletions
diff --git a/patches/server/0222-Expand-ArmorStand-API.patch b/patches/server/0222-Expand-ArmorStand-API.patch
index 1112902d66..d68ca34219 100644
--- a/patches/server/0222-Expand-ArmorStand-API.patch
+++ b/patches/server/0222-Expand-ArmorStand-API.patch
@@ -14,22 +14,24 @@ public net.minecraft.world.entity.decoration.ArmorStand isDisabled(Lnet/minecraf
Co-authored-by: SoSeDiK <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
-index 9923cea74ba39a774d6b16a225bc3e455e54c418..2c16cedf8cb2e4047415e056c419ed9c33c80e93 100644
+index 9923cea74ba39a774d6b16a225bc3e455e54c418..1087840331f68ffe79e79f6493137b2b894832f9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
-@@ -233,6 +233,147 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
+@@ -233,6 +233,149 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
getHandle().canMove = move;
}
+ @Override
+ public ItemStack getItem(org.bukkit.inventory.EquipmentSlot slot) {
-+ com.google.common.base.Preconditions.checkNotNull(slot, "slot");
++ com.google.common.base.Preconditions.checkArgument(slot != null, "slot");
++ com.google.common.base.Preconditions.checkArgument(slot != EquipmentSlot.BODY, "Cannot get body item");
+ return getHandle().getItemBySlot(org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot)).asBukkitMirror();
+ }
+
+ @Override
+ public void setItem(org.bukkit.inventory.EquipmentSlot slot, ItemStack item) {
-+ com.google.common.base.Preconditions.checkNotNull(slot, "slot");
++ com.google.common.base.Preconditions.checkArgument(slot != null, "slot");
++ com.google.common.base.Preconditions.checkArgument(slot != EquipmentSlot.BODY, "Cannot set body item");
+ switch (slot) {
+ case HAND:
+ getEquipment().setItemInMainHand(item);