mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 01:06:01 +01:00
SPIGOT-1325: Make ItemStack deserialization more robust.
By: md_5 <git@md-5.net>
This commit is contained in:
parent
107ff2ff80
commit
bed18dc5ab
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue