mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 04:05:50 -07:00
SPIGOT-1325: Make ItemStack deserialization more robust.
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -530,7 +530,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args.containsKey("amount")) {
|
if (args.containsKey("amount")) {
|
||||||
amount = (Integer) args.get("amount");
|
amount = ((Number) args.get("amount")).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemStack result = new ItemStack(type, amount, damage);
|
ItemStack result = new ItemStack(type, amount, damage);
|
||||||
|
Reference in New Issue
Block a user