So i just made a simple plugin and it works. (added a command that does nothing) and it loads with no problems. but the permission node doesn't exist and i don't how to add it. i used devtools to make the .phar file. PHP: <?phpnamespace mmm545\MyPlugin; use pocketmine\plugin\PluginBase;use pocketmine\Server;use pocketmine\Player;use pocketmine\command\Command;use pocketmine\command\CommandSender;use pocketmine\utils\TextFormat; class Main extends PluginBase{ public function onCommand(CommandSender $sender, Command $command, string $label, array $args) : bool{ switch($command->getName()){ case "test": //will add code later break; } return true; }} yml file: Code: name: MyPlugin version: 1.0 main: mmm545\MyPlugin\Main api: 3.11.5 commands: test: description: Just a test. ... how can i add it? Thanks Here is a .zip file:
Add it to the plugin.yml like so: Code: name: MyPlugin version: 1.0 main: mmm545\MyPlugin\Main api: 3.11.5 commands: test: description: Just a test. permission: myplugin.test permissions: myplugin: default: false children: myplugin.test: default: op
PHP: if($sender->hasPermission("myplugin.test")){ //add some thing here} but first add permission like that reply
Jesus please start reading the original post and other replies before replying. I'm not hating you for trying to help, but please.