Skip to content

Commit

Permalink
more tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Nov 16, 2024
1 parent f0d6d16 commit d500448
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@
use pocketmine\timings\TimingsHandler;
use pocketmine\updater\UpdateChecker;
use pocketmine\utils\AssumptionFailedError;
use pocketmine\utils\BroadcastLoggerForwarder;
use pocketmine\utils\Config;
use pocketmine\utils\Filesystem;
use pocketmine\utils\Internet;
use pocketmine\utils\MainLogger;
use pocketmine\utils\BroadcastLoggerForwarder;
use pocketmine\utils\NotCloneable;
use pocketmine\utils\NotSerializable;
use pocketmine\utils\Process;
Expand Down
5 changes: 1 addition & 4 deletions src/command/defaults/MeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ public function execute(CommandSender $sender, string $commandLabel, array $args
throw new InvalidCommandSyntaxException();
}

$sender->getServer()->broadcastMessage(
$sender,
KnownTranslationFactory::chat_type_emote($sender instanceof Player ? $sender->getDisplayName() : $sender->getName(), TextFormat::RESET . implode(" ", $args))
);
$sender->getServer()->broadcastMessage($sender, KnownTranslationFactory::chat_type_emote($sender instanceof Player ? $sender->getDisplayName() : $sender->getName(), TextFormat::RESET . implode(" ", $args)));

return true;
}
Expand Down
11 changes: 4 additions & 7 deletions src/command/defaults/SayCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,10 @@ public function execute(CommandSender $sender, string $commandLabel, array $args
throw new InvalidCommandSyntaxException();
}

$sender->getServer()->broadcastMessage(
$sender,
KnownTranslationFactory::chat_type_announcement(
$sender instanceof Player ? $sender->getDisplayName() : ($sender instanceof ConsoleCommandSender ? "Server" : $sender->getName()),
implode(" ", $args)
)->prefix(TextFormat::LIGHT_PURPLE)
);
$sender->getServer()->broadcastMessage($sender, KnownTranslationFactory::chat_type_announcement(
$sender instanceof Player ? $sender->getDisplayName() : ($sender instanceof ConsoleCommandSender ? "Server" : $sender->getName()),
implode(" ", $args)
)->prefix(TextFormat::LIGHT_PURPLE));
return true;
}
}
1 change: 0 additions & 1 deletion src/player/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
use pocketmine\network\mcpe\protocol\types\entity\PlayerMetadataFlags;
use pocketmine\permission\DefaultPermissionNames;
use pocketmine\permission\DefaultPermissions;
use pocketmine\permission\Permissible;
use pocketmine\permission\PermissibleBase;
use pocketmine\permission\PermissibleDelegateTrait;
use pocketmine\player\chat\StandardChatFormatter;
Expand Down

0 comments on commit d500448

Please sign in to comment.