mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
TypeConverter: account for possible out-of-range meta in items
This commit is contained in:
parent
869dda9a45
commit
c8e1cfcbee
@ -232,6 +232,9 @@ class TypeConverter{
|
||||
$compound = null;
|
||||
}
|
||||
}
|
||||
if($meta < 0 || $meta >= 0x7fff){ //this meta value may have been restored from the NBT
|
||||
throw new TypeConversionException("Item meta must be in range 0 ... " . 0x7fff . " (received $meta)");
|
||||
}
|
||||
|
||||
try{
|
||||
return ItemFactory::getInstance()->get(
|
||||
|
Loading…
x
Reference in New Issue
Block a user