mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 10:49:10 +00:00
ItemSerializer: Prohibit serializing recipe input wildcards
This commit is contained in:
parent
93124c79ea
commit
86e7ae341f
@ -105,6 +105,9 @@ final class ItemSerializer{
|
||||
if($item->isNull()){
|
||||
throw new \InvalidArgumentException("Cannot serialize a null itemstack");
|
||||
}
|
||||
if($item->hasAnyDamageValue()){
|
||||
throw new \InvalidArgumentException("Cannot serialize a recipe input as a saved itemstack");
|
||||
}
|
||||
if($item instanceof ItemBlock){
|
||||
$data = $this->serializeBlockItem($item->getBlock());
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user