Fix the 'Remove uneeded validation' patch

Looks like it may have been broken during the 1.8 update (or it was always
broken)
This commit is contained in:
Thinkofdeath 2015-01-30 09:36:43 +00:00 committed by Zach
parent 51d8a94236
commit 4de67b82cf
1 changed files with 11 additions and 2 deletions

View File

@ -1,13 +1,22 @@
From a891dafd04483eed0eb8a093651f1aba00120547 Mon Sep 17 00:00:00 2001 From 5973bc2910615bddecb6be2e5e5701e5188c35cc Mon Sep 17 00:00:00 2001
From: drXor <mcyoung@mit.edu> From: drXor <mcyoung@mit.edu>
Date: Fri, 15 Aug 2014 18:11:09 -0400 Date: Fri, 15 Aug 2014 18:11:09 -0400
Subject: [PATCH] Remove uneeded validation Subject: [PATCH] Remove uneeded validation
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 3a87cb7..070b23a 100644 index 02f727a..99d3226 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -230,7 +230,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
this.lore = new ArrayList<String>(meta.lore);
}
- if (meta.hasEnchants()) {
+ if (meta.enchantments != null) { // Spigot
this.enchantments = new HashMap<Enchantment, Integer>(meta.enchantments);
}
@@ -531,7 +531,7 @@ class CraftMetaItem implements ItemMeta, Repairable { @@ -531,7 +531,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
} }