51 $args[0] = strtolower($args[0]);
52 if($args[0] ===
"ips"){
53 $list = $sender->getServer()->getIPBans();
54 }elseif($args[0] ===
"players"){
55 $list = $sender->getServer()->getNameBans();
60 $list = $sender->getServer()->getNameBans();
64 $list = array_map(
function(
BanEntry $entry) :
string{
65 return $entry->getName();
66 }, $list->getEntries());
67 sort($list, SORT_STRING);
68 $message = implode(
", ", $list);
70 if($args[0] ===
"ips"){
71 $sender->sendMessage(KnownTranslationFactory::commands_banlist_ips((
string) count($list)));
73 $sender->sendMessage(KnownTranslationFactory::commands_banlist_players((
string) count($list)));
76 $sender->sendMessage($message);