Changed /list to be the same as vanilla

This commit is contained in:
Shoghi Cervantes Pueyo 2013-04-22 16:39:33 +02:00
parent e81793174b
commit b759863bb1

View File

@ -205,15 +205,14 @@ class PlayerAPI{
} }
break; break;
case "list": case "list":
$output .= "There are ".count($this->server->clients)."/".$this->server->maxClients." players online:\n";
if(count($this->server->clients) == 0){ if(count($this->server->clients) == 0){
$output .= "No online players.\n";
break; break;
} }
$output .= "Online players: ";
foreach($this->server->clients as $c){ foreach($this->server->clients as $c){
$output .= $c->username.", "; $output .= $c->username.", ";
} }
$output = substr($output, 0, -2); $output = substr($output, 0, -2)."\n";
break; break;
} }
return $output; return $output;