mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
add return typehints for Item fluent methods
to prevent issues like a2d4baf8b9
happening again >.>
This commit is contained in:
@ -41,7 +41,7 @@ class ItemBlock extends Item{
|
||||
parent::__construct($itemId ?? $this->block->getId(), $meta, $this->block->getName());
|
||||
}
|
||||
|
||||
public function setDamage(int $meta){
|
||||
public function setDamage(int $meta) : Item{
|
||||
$this->block->setDamage($meta !== -1 ? $meta & 0xf : 0);
|
||||
return parent::setDamage($meta);
|
||||
}
|
||||
|
Reference in New Issue
Block a user