From 05da80c9c6403820552820c2d59793761968577b Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Thu, 26 Jul 2018 08:51:53 +1000 Subject: [PATCH] SPIGOT-4156: Fix deserializing things with damage and meta By: md_5 --- .../src/main/java/org/bukkit/inventory/ItemStack.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java index 41a4305368..3c91cbe635 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/paper-api/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; }