return types
This commit is contained in:
parent
b89cc7818c
commit
804d669513
@ -11,6 +11,7 @@ namespace mineplex\plugin\gameengine\game\components\world;
|
||||
use mineplex\plugin\gameengine\arenas\Arena;
|
||||
use mineplex\plugin\gameengine\game\components\world\event\WorldLoadFailEvent;
|
||||
use mineplex\plugin\gameengine\game\components\world\event\WorldLoadSuccessEvent;
|
||||
use mineplex\plugin\util\UtilArray;
|
||||
use mineplex\plugin\util\UtilString;
|
||||
use pocketmine\event\Listener;
|
||||
use pocketmine\level\Position;
|
||||
@ -231,19 +232,33 @@ class WorldComponent implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Position[][]
|
||||
*/
|
||||
public function getTeams()
|
||||
{
|
||||
return $this->mapTeams;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $key
|
||||
* @return int
|
||||
*/
|
||||
public function getSetting($key)
|
||||
{
|
||||
return $this->mapSettings[$key];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $key
|
||||
* @return Position[]
|
||||
*/
|
||||
public function getData($key)
|
||||
{
|
||||
return $this->mapData[$key];
|
||||
if (UtilArray::hasKey($key, $this->mapData))
|
||||
return $this->mapData[$key];
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getPosition()
|
||||
@ -251,7 +266,6 @@ class WorldComponent implements Listener
|
||||
return $this->getTeams()[0][0];
|
||||
}
|
||||
|
||||
|
||||
protected function strToPos($str)
|
||||
{
|
||||
if (strlen($str) < 5)
|
||||
|
Loading…
Reference in New Issue
Block a user