Fixing misused brezk statements
This commit is contained in:
parent
e3ea4cfeb5
commit
0cb3975928
4 changed files with 11 additions and 11 deletions
|
@ -34,9 +34,9 @@ class AllPlayers extends Selector{
|
|||
$params = $parameters + $defaultParams;
|
||||
$return = [];
|
||||
foreach(Server::getInstance()->getOnlinePlayers() as $p){
|
||||
if($params["c"] !== 0 && count($return) == $params["c"]) break; // Too much players
|
||||
if($p->getLevel()->getName() !== $params["lvl"] && $params["lvl"] !== "") break; // Not in the right level
|
||||
if(!$this->checkDefaultParams($p, $params)) break;
|
||||
if($params["c"] !== 0 && count($return) == $params["c"]) continue; // Too much players
|
||||
if($p->getLevel()->getName() !== $params["lvl"] && $params["lvl"] !== "") continue; // Not in the right level
|
||||
if(!$this->checkDefaultParams($p, $params)) continue;
|
||||
$return[] = $p->getName();
|
||||
}
|
||||
return $return;
|
||||
|
|
|
@ -37,9 +37,9 @@ class Entities extends Selector{
|
|||
$return = [];
|
||||
foreach(Server::getInstance()->getLevels() as $lvl){
|
||||
foreach($lvl->getEntities() as $e){
|
||||
if($params["c"] !== 0 && count($return) == $params["c"]) break; // Too much players
|
||||
if($e->getLevel()->getName() !== $params["lvl"] && $params["lvl"] !== "") break; // Not in the right level
|
||||
if(!$this->checkDefaultParams($e, $params)) break;
|
||||
if($params["c"] !== 0 && count($return) == $params["c"]) continue; // Too much players
|
||||
if($e->getLevel()->getName() !== $params["lvl"] && $params["lvl"] !== "") continue; // Not in the right level
|
||||
if(!$this->checkDefaultParams($e, $params)) continue;
|
||||
$return[] = "e" . $e->getId();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ class RandomPlayer extends Selector{
|
|||
$params = $parameters + $defaultParams;
|
||||
$possible = [];
|
||||
foreach(Server::getInstance()->getOnlinePlayers() as $p){
|
||||
if($p->getLevel()->getName() !== $params["lvl"] && $params["lvl"] !== "") break; // Not in the right level
|
||||
if(!$this->checkDefaultParams($p, $params)) break;
|
||||
if($p->getLevel()->getName() !== $params["lvl"] && $params["lvl"] !== "") continue; // Not in the right level
|
||||
if(!$this->checkDefaultParams($p, $params)) continue;
|
||||
$possible[] = $p;
|
||||
}
|
||||
if(count($possible) == 0) return [];
|
||||
|
|
|
@ -38,9 +38,9 @@ class WorldPlayers extends Selector{
|
|||
$params = $parameters + $defaultParams;
|
||||
$return = [];
|
||||
foreach(Server::getInstance()->getOnlinePlayers() as $p){
|
||||
if($params["c"] !== 0 && count($return) == $params["c"]) break; // Too much players
|
||||
if($p->getLevel()->getName() !== $params["lvl"] && $params["lvl"] !== "") break; // Not in the right level
|
||||
if(!$this->checkDefaultParams($p, $params)) break;
|
||||
if($params["c"] !== 0 && count($return) == $params["c"]) continue; // Too much players
|
||||
if($p->getLevel()->getName() !== $params["lvl"] && $params["lvl"] !== "") continue; // Not in the right level
|
||||
if(!$this->checkDefaultParams($p, $params)) continue;
|
||||
$return[] = $p->getName();
|
||||
}
|
||||
return $return;
|
||||
|
|
Loading…
Reference in a new issue