mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 03:08:58 +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()){
|
if($item->isNull()){
|
||||||
throw new \InvalidArgumentException("Cannot serialize a null itemstack");
|
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){
|
if($item instanceof ItemBlock){
|
||||||
$data = $this->serializeBlockItem($item->getBlock());
|
$data = $this->serializeBlockItem($item->getBlock());
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user