SPIGOT-1325: Make ItemStack deserialization more robust.

This commit is contained in:
md_5 2015-12-06 11:11:27 +11:00
parent 76ffae6d58
commit f10a7a92f3

View file

@ -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);