diff --git a/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch index a3f31ff78f..ab8a067f1a 100644 --- a/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch @@ -13,7 +13,7 @@ starting point for future additions in this area. Fixes GH-559 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index caaed7cf0b..2672b004db 100644 +index caaed7cf0..2672b004d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory { @@ -26,7 +26,7 @@ index caaed7cf0b..2672b004db 100644 case CHEST: case TRAPPED_CHEST: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 2733cda407..e7daa95078 100644 +index 2733cda40..e7daa9507 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -0,0 +0,0 @@ public final class CraftItemStack extends ItemStack { @@ -40,7 +40,7 @@ index 2733cda407..e7daa95078 100644 case TRAPPED_CHEST: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java new file mode 100644 -index 0000000000..0e8acf12e4 +index 000000000..0e8acf12e --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -0,0 +0,0 @@ @@ -354,7 +354,7 @@ index 0000000000..0e8acf12e4 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 7c9c8d401a..b90a02ef6f 100644 +index 652866881..55afe8382 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { @@ -383,7 +383,7 @@ index 7c9c8d401a..b90a02ef6f 100644 } return HANDLED_TAGS; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index 00f89f2296..ef9d40b8a0 100644 +index 00f89f229..ef9d40b8a 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -0,0 +0,0 @@ import static org.hamcrest.Matchers.*; diff --git a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch index c4059b0ec0..bddbc38798 100644 --- a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch @@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 318c4204df..56787ed25c 100644 +index 318c4204d..56787ed25 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ import com.mojang.brigadier.StringReader; @@ -78,7 +78,7 @@ index 318c4204df..56787ed25c 100644 public boolean hasEnchantments() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 1d0580ff7f..2733cda407 100644 +index 1d0580ff7..2733cda40 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -0,0 +0,0 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS; @@ -201,7 +201,7 @@ index 1d0580ff7f..2733cda407 100644 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index ae5daa5374..7c9c8d401a 100644 +index 99276f116..652866881 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ import java.lang.reflect.Constructor; diff --git a/Spigot-Server-Patches/Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index ed1c70bedf..146cca71f1 100644 --- a/Spigot-Server-Patches/Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/Spigot-Server-Patches/Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index b90a02ef6f..c9d4d45564 100644 +index 55afe8382..d92811925 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { diff --git a/Spigot-Server-Patches/Return-null-if-we-get-a-ParseException-in-IChatBaseC.patch b/Spigot-Server-Patches/Return-null-if-we-get-a-ParseException-in-IChatBaseC.patch index 7c403efe33..2b30acad24 100644 --- a/Spigot-Server-Patches/Return-null-if-we-get-a-ParseException-in-IChatBaseC.patch +++ b/Spigot-Server-Patches/Return-null-if-we-get-a-ParseException-in-IChatBaseC.patch @@ -16,7 +16,7 @@ Shulkers) may need to be changed in order for it to re-save properly No more crashing though. diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java -index ff14b3e093..03c148f4f6 100644 +index ff14b3e09..03c148f4f 100644 --- a/src/main/java/net/minecraft/server/IChatBaseComponent.java +++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java @@ -0,0 +0,0 @@ public interface IChatBaseComponent extends Message, Iterable -Date: Sat, 22 Sep 2018 12:55:43 -0400 -Subject: [PATCH] Spigot PR 493 - - -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index c9d4d45564..d928119254 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { - continue; - } - net.minecraft.server.AttributeModifier nmsModifier = GenericAttributes.a(entry); -- Preconditions.checkNotNull(nmsModifier, "Could not create AttributeModifier. %s", entry.toString()); -+ if (nmsModifier == null) { -+ continue; -+ } - - AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier); - - String attributeName = entry.getString(ATTRIBUTES_IDENTIFIER.NBT); -- Preconditions.checkArgument(!Strings.isNullOrEmpty(attributeName), "Missing Attribute for AttributeModifier. %s", entry.toString()); -+ if (attributeName == null || attributeName.isEmpty()) { -+ continue; -+ } - - Attribute attribute = CraftAttributeMap.fromMinecraft(attributeName); -- Preconditions.checkNotNull(attribute, "Could not convert to Bukkit Attribute. %s", attributeName); -+ if (attribute == null) { -+ continue; -+ } - - if (entry.hasKeyOfType(ATTRIBUTES_SLOT.NBT, CraftMagicNumbers.NBT.TAG_STRING)) { - String slotName = entry.getString(ATTRIBUTES_SLOT.NBT); -- Preconditions.checkArgument(!Strings.isNullOrEmpty(slotName), "Missing Slot when Slot is specified. %s", entry.toString()); -+ if (slotName == null || slotName.isEmpty()) { -+ modifiers.put(attribute, attribMod); -+ continue; -+ } - - EquipmentSlot slot = CraftEquipmentSlot.getSlot(EnumItemSlot.a(slotName.toLowerCase(Locale.ROOT))); // PAIL rename fromName -- Preconditions.checkNotNull(slot, "No Slot found when Slot was specified. %s", entry.toString()); -+ if (slot == null) { -+ modifiers.put(attribute, attribMod); -+ continue; -+ } - - attribMod = new AttributeModifier(attribMod.getUniqueId(), attribMod.getName(), attribMod.getAmount(), attribMod.getOperation(), slot); - } -@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { - } - net.minecraft.server.AttributeModifier nmsModifier = CraftAttributeInstance.convert(entry.getValue()); - NBTTagCompound sub = GenericAttributes.a(nmsModifier); -- Preconditions.checkState(!sub.isEmpty(), "Could not convert AttributeModifier. It was supplied in an invalid format. The following was supplied: %s", sub.toString()); -+ if (sub.isEmpty()) { -+ continue; -+ } - - String name = CraftAttributeMap.toMinecraft(entry.getKey()); -- Preconditions.checkArgument(!Strings.isNullOrEmpty(name), "Could not convert to Bukkit Attribute. %s", entry.getKey().name()); -+ if (name == null || name.isEmpty()) { -+ continue; -+ } - - sub.setString(ATTRIBUTES_IDENTIFIER.NBT, name); // Attribute Name - if (entry.getValue().getSlot() != null) { --- \ No newline at end of file diff --git a/work/CraftBukkit b/work/CraftBukkit index 65bb2d0f7d..fc10dec5f3 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 65bb2d0f7d4d1581a11717784d8c6b6dc023fa91 +Subproject commit fc10dec5f369d71a5f0baad17b386ec9706b0773