mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Use Item->isNull() more
This commit is contained in:
@ -105,7 +105,7 @@ class SimpleInventoryTransaction implements InventoryTransaction{
|
||||
*/
|
||||
protected function matchItems(array &$needItems, array &$haveItems) : bool{
|
||||
foreach($this->actions as $key => $action){
|
||||
if($action->getTargetItem()->getId() !== Item::AIR){
|
||||
if(!$action->getTargetItem()->isNull()){
|
||||
$needItems[] = $action->getTargetItem();
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ class SimpleInventoryTransaction implements InventoryTransaction{
|
||||
return false;
|
||||
}
|
||||
|
||||
if($action->getSourceItem()->getId() !== Item::AIR){
|
||||
if(!$action->getSourceItem()->isNull()){
|
||||
$haveItems[] = $action->getSourceItem();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user