mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
More fixes :D
This commit is contained in:
parent
7236f4aad6
commit
c27cca6741
9 changed files with 56 additions and 44 deletions
|
|
@ -253,12 +253,12 @@ class PlayerAPI{
|
|||
public function getAll($level = null){
|
||||
if($level instanceof Level){
|
||||
$clients = array();
|
||||
$l = $this->server->query("SELECT EID FROM entities WHERE level = '".$this->level->getName()."' AND class = '".ENTITY_PLAYER."';");
|
||||
$l = $this->server->query("SELECT EID FROM entities WHERE level = '".$level->getName()."' AND class = '".ENTITY_PLAYER."';");
|
||||
if($l !== false and $l !== true){
|
||||
while(($e = $l->fetchArray(SQLITE3_ASSOC)) !== false){
|
||||
$e = $this->getByEID($e["EID"]);
|
||||
if($e instanceof Player){
|
||||
$clients[$e->clientID] = $e->player;
|
||||
$clients[$e->clientID] = $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue