From bed18dc5abcaa72a7ed5ca2aefe30e495f8bf0d9 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 6 Dec 2015 11:11:27 +1100 Subject: [PATCH] SPIGOT-1325: Make ItemStack deserialization more robust. By: md_5 --- paper-api/src/main/java/org/bukkit/inventory/ItemStack.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8f105d91d..d9cff5b0d 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java @@ -530,7 +530,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { } if (args.containsKey("amount")) { - amount = (Integer) args.get("amount"); + amount = ((Number) args.get("amount")).intValue(); } ItemStack result = new ItemStack(type, amount, damage);