Added more typehints to Tile namespace

This commit is contained in:
Dylan K. Taylor
2017-10-16 16:14:44 +01:00
parent 45b003ac2e
commit 0b1a9ba062
10 changed files with 24 additions and 24 deletions

View File

@ -43,7 +43,7 @@ abstract class Spawnable extends Tile{
return $pk;
}
public function spawnTo(Player $player){
public function spawnTo(Player $player) : bool{
if($this->closed){
return false;
}
@ -67,7 +67,7 @@ abstract class Spawnable extends Tile{
$this->level->addChunkPacket($this->chunk->getX(), $this->chunk->getZ(), $pk);
}
protected function onChanged(){
protected function onChanged() : void{
$this->spawnToAll();
if($this->chunk !== null){
@ -96,7 +96,7 @@ abstract class Spawnable extends Tile{
*
* @param CompoundTag $nbt
*/
abstract public function addAdditionalSpawnData(CompoundTag $nbt);
abstract public function addAdditionalSpawnData(CompoundTag $nbt) : void;
/**
* Called when a player updates a block entity's NBT data