48 if(count($args) === 0){
52 $name = array_shift($args);
53 $reason = implode(
" ", $args);
55 $sender->getServer()->getNameBans()->addBan($name, $reason,
null, $sender->getName());
57 if(($player = $sender->getServer()->getPlayerExact($name)) instanceof
Player){
58 $player->kick($reason !==
"" ? KnownTranslationFactory::pocketmine_disconnect_ban($reason) : KnownTranslationFactory::pocketmine_disconnect_ban_noReason());
61 Command::broadcastCommandMessage($sender, KnownTranslationFactory::commands_ban_success($player !==
null ? $player->getName() : $name));