mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-07 10:31:51 +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;
|
$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{
|
try{
|
||||||
return ItemFactory::getInstance()->get(
|
return ItemFactory::getInstance()->get(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user