54 $player = $sender->getServer()->getPlayerByPrefix(array_shift($args));
56 if($player === $sender){
57 $sender->sendMessage(KnownTranslationFactory::commands_message_sameTarget()->prefix(TextFormat::RED));
61 if($player instanceof
Player){
62 $message = implode(
" ", $args);
63 $sender->sendMessage(KnownTranslationFactory::commands_message_display_outgoing($player->getDisplayName(), $message)->prefix(TextFormat::GRAY . TextFormat::ITALIC));
64 $name = $sender instanceof
Player ? $sender->getDisplayName() : $sender->getName();
65 $player->sendMessage(KnownTranslationFactory::commands_message_display_incoming($name, $message)->prefix(TextFormat::GRAY . TextFormat::ITALIC));
66 Command::broadcastCommandMessage($sender, KnownTranslationFactory::commands_message_display_outgoing($player->getDisplayName(), $message),
false);
68 $sender->sendMessage(KnownTranslationFactory::commands_generic_player_notFound());