SPIGOT-1325: Make ItemStack deserialization more robust.

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot 2015-12-06 11:11:27 +11:00
parent 107ff2ff80
commit bed18dc5ab

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