Does anyone know how I can add permission using php? Is this something valid? PHP: public function onBreak(BlockBreakEvent $event) {$perm = “command.command”$event->getPlayer()->addPermission($perm);}
You need to register a required permission to a command in plugin.yml like so: PHP: example: usage: /example description: An example command permission: pluginname.command.example
So like this? PHP: public function onBreak(BlockBreakEvent $event) {$perm = “command.command”$event->getPlayer()->addAttachment($plugin, $perm, $bool);}
$plugin is Main class of your plugin , if you are executing code in your main class use $this and $bool is just boolean (true,false) http://php.net/manual/en/language.types.boolean.php
Search before you ask please https://forums.pmmp.io/search/6808400/?q=add+perm&o=date https://forums.pmmp.io/threads/how-...o-player-using-addattachment.4382/#post-40790 https://forums.pmmp.io/threads/basic-permission-manager.3391/