diff --git a/src/command/PluginCommand.php b/src/command/PluginCommand.php index 4c7757b59..a6cce8555 100644 --- a/src/command/PluginCommand.php +++ b/src/command/PluginCommand.php @@ -35,13 +35,14 @@ class PluginCommand extends Command implements PluginIdentifiableCommand{ private $executor; /** - * @param string $name - * @param Plugin $owner + * @param string $name + * @param Plugin $owner + * @param CommandExecutor $executor */ - public function __construct(string $name, Plugin $owner){ + public function __construct(string $name, Plugin $owner, CommandExecutor $executor){ parent::__construct($name); $this->owningPlugin = $owner; - $this->executor = $owner; + $this->executor = $executor; $this->usageMessage = ""; } diff --git a/src/plugin/PluginBase.php b/src/plugin/PluginBase.php index a3a16f3d3..eb1f56a80 100644 --- a/src/plugin/PluginBase.php +++ b/src/plugin/PluginBase.php @@ -181,7 +181,7 @@ abstract class PluginBase implements Plugin, CommandExecutor{ continue; } if(is_array($data)){ //TODO: error out if it isn't - $newCmd = new PluginCommand($key, $this); + $newCmd = new PluginCommand($key, $this, $this); if(isset($data["description"])){ $newCmd->setDescription($data["description"]); }