mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
populate remaining missing return types, using native returns where possible
this is done separately to stable so that stable changes can be integrated easily using an empty merge.
This commit is contained in:
@ -136,7 +136,7 @@ class Chest extends Spawnable implements Container, Nameable{
|
||||
return $this->inventory;
|
||||
}
|
||||
|
||||
protected function checkPairing(){
|
||||
protected function checkPairing() : void{
|
||||
if($this->isPaired() and !$this->pos->getWorld()->isInLoadedTerrain(new Vector3($this->pairX, $this->pos->y, $this->pairZ))){
|
||||
//paired to a tile in an unloaded chunk
|
||||
$this->doubleInventory = null;
|
||||
@ -170,7 +170,7 @@ class Chest extends Spawnable implements Container, Nameable{
|
||||
return "Chest";
|
||||
}
|
||||
|
||||
public function isPaired(){
|
||||
public function isPaired() : bool{
|
||||
return $this->pairX !== null and $this->pairZ !== null;
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ class Chest extends Spawnable implements Container, Nameable{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function pairWith(Chest $tile){
|
||||
public function pairWith(Chest $tile) : bool{
|
||||
if($this->isPaired() or $tile->isPaired()){
|
||||
return false;
|
||||
}
|
||||
@ -202,7 +202,7 @@ class Chest extends Spawnable implements Container, Nameable{
|
||||
return true;
|
||||
}
|
||||
|
||||
private function createPair(Chest $tile){
|
||||
private function createPair(Chest $tile) : void{
|
||||
$this->pairX = $tile->getPos()->x;
|
||||
$this->pairZ = $tile->getPos()->z;
|
||||
|
||||
@ -210,7 +210,7 @@ class Chest extends Spawnable implements Container, Nameable{
|
||||
$tile->pairZ = $this->getPos()->z;
|
||||
}
|
||||
|
||||
public function unpair(){
|
||||
public function unpair() : bool{
|
||||
if(!$this->isPaired()){
|
||||
return false;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ class Furnace extends Spawnable implements Container, Nameable{
|
||||
return $this->getInventory();
|
||||
}
|
||||
|
||||
protected function checkFuel(Item $fuel){
|
||||
protected function checkFuel(Item $fuel) : void{
|
||||
$ev = new FurnaceBurnEvent($this, $fuel, $fuel->getFuelTime());
|
||||
$ev->call();
|
||||
if($ev->isCancelled()){
|
||||
|
Reference in New Issue
Block a user