mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Added typehints and PhpDoc for events API
excluded blocks and entities events API to avoid merge conflicts
This commit is contained in:
@ -46,7 +46,7 @@ abstract class ChunkEvent extends LevelEvent{
|
||||
/**
|
||||
* @return Chunk
|
||||
*/
|
||||
public function getChunk(){
|
||||
public function getChunk() : Chunk{
|
||||
return $this->chunk;
|
||||
}
|
||||
}
|
@ -33,6 +33,7 @@ use pocketmine\level\format\Chunk;
|
||||
class ChunkLoadEvent extends ChunkEvent{
|
||||
public static $handlerList = null;
|
||||
|
||||
/** @var bool */
|
||||
private $newChunk;
|
||||
|
||||
public function __construct(Level $level, Chunk $chunk, bool $newChunk){
|
||||
@ -43,7 +44,7 @@ class ChunkLoadEvent extends ChunkEvent{
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isNewChunk(){
|
||||
public function isNewChunk() : bool{
|
||||
return $this->newChunk;
|
||||
}
|
||||
}
|
@ -43,7 +43,7 @@ abstract class LevelEvent extends Event{
|
||||
/**
|
||||
* @return Level
|
||||
*/
|
||||
public function getLevel(){
|
||||
public function getLevel() : Level{
|
||||
return $this->level;
|
||||
}
|
||||
}
|
@ -48,7 +48,7 @@ class SpawnChangeEvent extends LevelEvent{
|
||||
/**
|
||||
* @return Position
|
||||
*/
|
||||
public function getPreviousSpawn(){
|
||||
public function getPreviousSpawn() : Position{
|
||||
return $this->previousSpawn;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user