mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +00:00
Fix /list adding a trailing comma.
This commit is contained in:
parent
e0705c80e2
commit
c266cb991c
@ -277,14 +277,14 @@ class PlayerAPI{
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "list":
|
case "list":
|
||||||
$output .= "There are ".count($this->server->clients)."/".$this->server->maxClients." players online:\n";
|
$cmd_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){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
foreach($this->server->clients as $c){
|
foreach($this->server->clients as $c){
|
||||||
$output .= $c->username.", ";
|
$cmd_output .= $c->username.", ";
|
||||||
}
|
}
|
||||||
$output = substr($output, 0, -2)."\n";
|
$output = substr($cmd_output, 0, -2)."\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user