10-08-2015, 07:07 AM
That's a great idea, thanks! (And welcome to the forum, by the way )
Keep in mind that there are plugins that use subcommands ("/time set" etc.), your plugin may want to parse those as well.
As a side idea, it would be even better to allow the admin to assign the permission to a permission-group, somehow. My first idea: add an Assign button in each permission's row and the page that it displays would have a list of all permission groups and a button to add the permission or add as restriction. Some special care would be needed if the group already contained a parent permission, such as "core.*"; it would make sense to disable adding any "core.something" permission to such a group (but still makes sense to add it as a restriction).
Keep in mind that there are plugins that use subcommands ("/time set" etc.), your plugin may want to parse those as well.
As a side idea, it would be even better to allow the admin to assign the permission to a permission-group, somehow. My first idea: add an Assign button in each permission's row and the page that it displays would have a list of all permission groups and a button to add the permission or add as restriction. Some special care would be needed if the group already contained a parent permission, such as "core.*"; it would make sense to disable adding any "core.something" permission to such a group (but still makes sense to add it as a restriction).