diff --git a/Spigot-Server-Patches/0073-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0073-Handle-Item-Meta-Inconsistencies.patch index fe212d953d..88e0fd8807 100644 --- a/Spigot-Server-Patches/0073-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0073-Handle-Item-Meta-Inconsistencies.patch @@ -1,4 +1,4 @@ -From ff28547573c85476ee8bbeec81798071b530501d Mon Sep 17 00:00:00 2001 +From 5320ce6f08793e99128863e2dc9419b009caa2c3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 May 2015 23:00:19 -0400 Subject: [PATCH] Handle Item Meta Inconsistencies @@ -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/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 3f11e4279..ebb3e04bc 100644 +index 3f11e427..ebb3e04b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -4,6 +4,7 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS; @@ -144,7 +144,7 @@ index 3f11e4279..ebb3e04bc 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 724da6772..935cbe867 100644 +index c743ae06..0cdc8007 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,13 +6,8 @@ import java.lang.annotation.RetentionPolicy; @@ -240,7 +240,7 @@ index 724da6772..935cbe867 100644 for (Map.Entry entry : ench.entrySet()) { // Doctor older enchants String enchantKey = entry.getKey().toString(); -@@ -701,12 +704,12 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -703,13 +706,13 @@ class CraftMetaItem implements ItemMeta, Repairable { } public Map getEnchants() { @@ -249,13 +249,14 @@ index 724da6772..935cbe867 100644 } public boolean addEnchant(Enchantment ench, int level, boolean ignoreRestrictions) { + Validate.notNull(ench, "Enchantment cannot be null"); if (enchantments == null) { - enchantments = new HashMap(4); + enchantments = new EnchantmentMap(); // Paper } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -876,7 +879,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -880,7 +883,7 @@ class CraftMetaItem implements ItemMeta, Repairable { clone.lore = new ArrayList(this.lore); } if (this.enchantments != null) { @@ -264,7 +265,7 @@ index 724da6772..935cbe867 100644 } clone.hideFlag = this.hideFlag; clone.unbreakable = this.unbreakable; -@@ -1034,6 +1037,23 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -1038,6 +1041,23 @@ class CraftMetaItem implements ItemMeta, Repairable { } } @@ -289,5 +290,5 @@ index 724da6772..935cbe867 100644 private final Spigot spigot = new Spigot() { -- -2.13.0 +2.11.0 diff --git a/work/CraftBukkit b/work/CraftBukkit index 0481ae963a..d603539842 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 0481ae963aad545b2f1162d764bcbff18721e2f0 +Subproject commit d603539842fe24dc1b37130e47fafe734a542a69 diff --git a/work/Spigot b/work/Spigot index 23b6354742..722832861f 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 23b6354742083ff4b613da6129a70ef94ede3d90 +Subproject commit 722832861f0300f0b1e9d9079b0085bca5387ce2