facepalm section... add this to your main class to add the permission PHP: /** PermissionAttachment $permissionAttachment */$permissionAttachment = $player->addAttachment($this, "x.perm", true); This is to remove the attachment: PHP: /** PermissionAttachment $permissionAttachment */$player->removeAttachment($permissionAttachment);
This isn't working if I use the before declared permission. Or do I need to define it desperately? How?
If PurePerms is too confusing for you, I would recommend looking at @SOFe plugin https://github.com/SOF3/simple-plugins/tree/master/SimplePermissions