mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
WhitelistCommand: sort output of /whitelist list into lexical order
This commit is contained in:
parent
a60fc4cc28
commit
3b961d0e5f
@ -31,7 +31,9 @@ use pocketmine\Player;
|
||||
use pocketmine\utils\TextFormat;
|
||||
use function count;
|
||||
use function implode;
|
||||
use function sort;
|
||||
use function strtolower;
|
||||
use const SORT_STRING;
|
||||
|
||||
class WhitelistCommand extends VanillaCommand{
|
||||
|
||||
@ -71,6 +73,7 @@ class WhitelistCommand extends VanillaCommand{
|
||||
return true;
|
||||
case "list":
|
||||
$entries = $sender->getServer()->getWhitelisted()->getAll(true);
|
||||
sort($entries, SORT_STRING);
|
||||
$result = implode($entries, ", ");
|
||||
$count = count($entries);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user