mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Use SplFixedArrays in inventory, added more typehints and cleaned up some duplicated code
This commit is contained in:
@ -828,6 +828,10 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
$this->count = $count;
|
||||
}
|
||||
|
||||
public function isNull() : bool{
|
||||
return $this->count <= 0 or $this->id === Item::AIR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the item, or the custom name if it is set.
|
||||
* @return string
|
||||
|
Reference in New Issue
Block a user