mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
SPIGOT-1325: Make ItemStack deserialization more robust.
By: md_5 <git@md-5.net>
This commit is contained in:
1 parent
107ff2ff80
commit
bed18dc5ab
1 file changed
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user