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