mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 22:15:30 +00:00
Merge commit 'fb6491dde'
# Conflicts: # resources/vanilla
This commit is contained in:
commit
991abe8864
@ -30,7 +30,9 @@ use pocketmine\permission\BanEntry;
|
|||||||
use function array_map;
|
use function array_map;
|
||||||
use function count;
|
use function count;
|
||||||
use function implode;
|
use function implode;
|
||||||
|
use function sort;
|
||||||
use function strtolower;
|
use function strtolower;
|
||||||
|
use const SORT_STRING;
|
||||||
|
|
||||||
class BanListCommand extends VanillaCommand{
|
class BanListCommand extends VanillaCommand{
|
||||||
|
|
||||||
@ -62,10 +64,11 @@ class BanListCommand extends VanillaCommand{
|
|||||||
$args[0] = "players";
|
$args[0] = "players";
|
||||||
}
|
}
|
||||||
|
|
||||||
$list = $list->getEntries();
|
$list = array_map(function(BanEntry $entry) : string{
|
||||||
$message = implode(", ", array_map(function(BanEntry $entry) : string{
|
|
||||||
return $entry->getName();
|
return $entry->getName();
|
||||||
}, $list));
|
}, $list->getEntries());
|
||||||
|
sort($list, SORT_STRING);
|
||||||
|
$message = implode(", ", $list);
|
||||||
|
|
||||||
if($args[0] === "ips"){
|
if($args[0] === "ips"){
|
||||||
$sender->sendMessage(new TranslationContainer("commands.banlist.ips", [count($list)]));
|
$sender->sendMessage(new TranslationContainer("commands.banlist.ips", [count($list)]));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user