◆ __construct()
__construct |
( |
|
$alias, |
|
|
array |
$formatStrings |
|
) |
| |
- Parameters
-
string | $alias | |
| string[] | $formatStrings |
37 parent::__construct($alias);
38 $this->formatStrings = $formatStrings;
◆ execute()
- Parameters
-
- Returns
- bool
53 foreach($this->formatStrings as $formatString){
55 $commands[] = $this->buildCommand($formatString, $args);
56 }
catch(\Throwable $e){
57 if($e instanceof \InvalidArgumentException){
60 $sender->sendMessage(
new TranslationContainer(
TextFormat::RED .
"%commands.generic.exception"));
61 $logger = $sender->getServer()->getLogger();
62 if(
$logger instanceof MainLogger){
71 foreach($commands as $command){
75 return (
bool) $result;
The documentation for this class was generated from the following file:
- src/pocketmine/command/FormattedCommandAlias.php