im getting this error and dont know how to fix i checked pmmp already PHP: class BaseCommand extends Command implements PluginIdentifiableCommand{ private $plugin; public function __construct(Main $plugin, $name, $description, $usageMessage, $aliases){ parent::__construct($name, $description, $usageMessage, $aliases); $this->plugin = $plugin; } public function execute(CommandSender $sender, string $commandLabel, array $args){ if ($this->testPermission($sender)) { $result = $this->onExecute($sender, $args); if (is_string($result)) { $sender->sendMessage($result); } return true; } return false; } public function onExecute(CommandSender $sender, array $args){ } public function getPlugin(){ return $this->plugin; } }
you need to add lugin -> public function getPlugin(): Plugin{ return $this->plugin; } too lazy for code tags.
??? PHP: class BaseCommand extends Command implements PluginIdentifiableCommand{ /** * @return Plugin */ public function getPlugin($plugin) : Plugin; private $plugin; public function __construct(Main $plugin, $name, $description, $usageMessage, $aliases){ parent::__construct($name, $description, $usageMessage, $aliases); $this->plugin = $plugin; } public function execute(CommandSender $sender, string $commandLabel, array $args){ if ($this->testPermission($sender)) { $result = $this->onExecute($sender, $args); if (is_string($result)) { $sender->sendMessage($result); } return true; } return false; } public function onExecute(CommandSender $sender, array $args){ } public function getPlugin(){ return $this->plugin; } }