I'm having issues setting up commands in my plugin.yml file and I can't seem to find what I have done wrong Plugin.yml: Code: commands: startweb: description: Starts the web server usage: "/startweb" permission: "pmmpweb.command.startweb" stopweb: description: Stops the web server usage: "/stopweb" permission: "pmmpweb.command.stopweb" Screenshot:
In what way? Edit: here is main.php PHP: // this is based on pmmp/ExamplePluginpublic function onCommand(CommandSender $sender, Command $command, string $label, array $args) : bool{ switch($command->getName()){ case "startweb": // other stuff return true; case "stopweb": // other stuff return true; default: return false; } }
You just did errors with the spaces on the configuration Code: commands: startweb: description: Starts the web server usage: "/startweb" permission: "pmmpweb.command.startweb" stopweb: description: Stops the web server usage: "/stopweb" permission: "pmmpweb.command.stopweb"