mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
use null coalesce in Server->getLevel()
This commit is contained in:
parent
f5534a9ab0
commit
89e4defa29
@ -947,11 +947,7 @@ class Server{
|
||||
* @return Level|null
|
||||
*/
|
||||
public function getLevel(int $levelId) : ?Level{
|
||||
if(isset($this->levels[$levelId])){
|
||||
return $this->levels[$levelId];
|
||||
}
|
||||
|
||||
return null;
|
||||
return $this->levels[$levelId] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user