diff options
author | md_5 <git@md-5.net> | 2018-07-26 08:51:53 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-07-26 08:51:53 +1000 |
commit | 3607913caf81560ff9e809aba8e6fcbfebab4d02 (patch) | |
tree | 208e9bbd1a37de60cfa76cb3041f6a27ed021749 | |
parent | 22efc697100009c05c6659a534747516ab6eb270 (diff) | |
download | bukkit-3607913caf81560ff9e809aba8e6fcbfebab4d02.tar bukkit-3607913caf81560ff9e809aba8e6fcbfebab4d02.tar.gz bukkit-3607913caf81560ff9e809aba8e6fcbfebab4d02.tar.lz bukkit-3607913caf81560ff9e809aba8e6fcbfebab4d02.tar.xz bukkit-3607913caf81560ff9e809aba8e6fcbfebab4d02.zip |
SPIGOT-4156: Fix deserializing things with damage and meta
-rw-r--r-- | src/main/java/org/bukkit/inventory/ItemStack.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java index 41a43053..3c91cbe6 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -488,6 +488,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { } } + if (version < 0) { + // Set damage again incase meta overwrote it + if (args.containsKey("damage")) { + result.setDurability(damage); + } + } + return result; } |