From 1749f26e0373be8d9107669a64502ee62b1f3e6f Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 1 Feb 2012 21:30:01 -0800 Subject: [PATCH] Fixed casting in ItemStack.deserialize. By: starrynte --- paper-api/src/main/java/org/bukkit/inventory/ItemStack.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 7a424c793d..95dc1f107e 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java @@ -356,18 +356,18 @@ public class ItemStack implements ConfigurationSerializable { public static ItemStack deserialize(Map args) { Material type = Material.getMaterial((String) args.get("type")); - int damage = 0; + short damage = 0; int amount = 1; if (args.containsKey("damage")) { - damage = (Integer) args.get("damage"); + damage = (Short) args.get("damage"); } if (args.containsKey("amount")) { amount = (Integer) args.get("amount"); } - ItemStack result = new ItemStack(type, amount, (short) damage); + ItemStack result = new ItemStack(type, amount, damage); if (args.containsKey("enchantments")) { Object raw = args.get("enchantments");