mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
More nullable and void typehints
This commit is contained in:
@@ -342,7 +342,7 @@ class LevelManager{
|
||||
*
|
||||
* @return Entity|null
|
||||
*/
|
||||
public function findEntity(int $entityId){
|
||||
public function findEntity(int $entityId) : ?Entity{
|
||||
foreach($this->levels as $level){
|
||||
assert(!$level->isClosed());
|
||||
if(($entity = $level->getEntity($entityId)) instanceof Entity){
|
||||
@@ -413,7 +413,7 @@ class LevelManager{
|
||||
/**
|
||||
* @param bool $value
|
||||
*/
|
||||
public function setAutoSave(bool $value){
|
||||
public function setAutoSave(bool $value) : void{
|
||||
$this->autoSave = $value;
|
||||
foreach($this->levels as $level){
|
||||
$level->setAutoSave($this->autoSave);
|
||||
|
Reference in New Issue
Block a user