41 use PermissibleDelegateTrait;
48 public function __construct(
52 $this->perm =
new PermissibleBase([DefaultPermissions::ROOT_CONSOLE =>
true]);
56 public function getServer() :
Server{
60 public function getLanguage() :
Language{
61 return $this->language;
64 public function sendMessage(Translatable|
string $message) : void{
65 if($message instanceof Translatable){
66 $message = $this->getLanguage()->translate($message);
69 foreach(explode(
"\n", trim($message), limit: PHP_INT_MAX) as $line){
70 Terminal::writeLine(TextFormat::GREEN .
"Command output | " . TextFormat::addBase(TextFormat::WHITE, $line));
74 public function getName() : string{
79 return $this->lineHeight ?? PHP_INT_MAX;
83 if($height !== null && $height < 1){
84 throw new \InvalidArgumentException(
"Line height must be at least 1");
86 $this->lineHeight = $height;