mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Consistent fluency for block property setters
This commit is contained in:
@ -81,13 +81,15 @@ class FlowerPot extends Flowable{
|
||||
return $this->plant;
|
||||
}
|
||||
|
||||
public function setPlant(?Block $plant) : void{
|
||||
/** @return $this */
|
||||
public function setPlant(?Block $plant) : self{
|
||||
if($plant === null or $plant instanceof Air){
|
||||
$this->plant = null;
|
||||
}else{
|
||||
$this->plant = clone $plant;
|
||||
}
|
||||
$this->occupied = $this->plant !== null;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function canAddPlant(Block $block) : bool{
|
||||
|
Reference in New Issue
Block a user