Archiviert
13
0

Fix the 'Remove uneeded validation' patch

Looks like it may have been broken during the 1.8 update (or it was always
broken)
Dieser Commit ist enthalten in:
Thinkofdeath 2015-01-30 09:36:43 +00:00 committet von Zach
Ursprung 51d8a94236
Commit 4de67b82cf

Datei anzeigen

@ -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>
Date: Fri, 15 Aug 2014 18:11:09 -0400
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
index 3a87cb7..070b23a 100644
index 02f727a..99d3226 100644
--- a/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 {
}