mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Merge branch 'next-minor' into next-major
This commit is contained in:
@ -30,6 +30,8 @@ use pocketmine\permission\DefaultPermissions;
|
||||
use pocketmine\permission\PermissibleBase;
|
||||
use pocketmine\permission\PermissibleDelegateTrait;
|
||||
use pocketmine\Server;
|
||||
use pocketmine\utils\Terminal;
|
||||
use pocketmine\utils\TextFormat;
|
||||
use function explode;
|
||||
use function trim;
|
||||
use const PHP_INT_MAX;
|
||||
@ -56,13 +58,12 @@ class ConsoleCommandSender implements CommandSender{
|
||||
}
|
||||
|
||||
public function sendMessage(Translatable|string $message) : void{
|
||||
$server = $this->getServer();
|
||||
if($message instanceof Translatable){
|
||||
$message = $this->getLanguage()->translate($message);
|
||||
}
|
||||
|
||||
foreach(explode("\n", trim($message)) as $line){
|
||||
$server->getLogger()->info($line);
|
||||
Terminal::writeLine(TextFormat::GREEN . "Command output | " . TextFormat::WHITE . $line);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user