50 if(count($args) === 0){
54 $name = array_shift($args);
55 $reason = trim(implode(
" ", $args));
57 if(($player = $sender->getServer()->getPlayerByPrefix($name)) instanceof
Player){
58 $player->kick($reason !==
"" ? KnownTranslationFactory::pocketmine_disconnect_kick($reason) : KnownTranslationFactory::pocketmine_disconnect_kick_noReason());
60 Command::broadcastCommandMessage($sender, KnownTranslationFactory::commands_kick_success_reason($player->getName(), $reason));
62 Command::broadcastCommandMessage($sender, KnownTranslationFactory::commands_kick_success($player->getName()));
65 $sender->sendMessage(KnownTranslationFactory::commands_generic_player_notFound()->prefix(TextFormat::RED));