RedProtect Anti-Grief

RedProtect Anti-Grief

73.3k Downloads

[Suggestion] Deny access to command before asking for confirmation, not after

ShadowFlare opened this issue ยท 3 comments

commented

Is your feature request related to a problem? Please describe.
When a command requires confirmation, it asks for it before telling the user they don't have access to it, which is confusing. For example, attempting to delete a region that you aren't allowed to delete will ask for confirmation anyway.

Describe the solution you'd like
To be more clear about what users can and cannot access, it would be nice to have the permission check come before asking for confirmation rather than after, so it's not asking for confirmation on an action that will be denied anyway.

Depending on how adding confirmation to the commands is implemented, maybe this isn't an easy thing to implement, though.

commented

Changed in cba3923 on latest dev builds

commented

Oh, didn't realize it would be (almost) that simple. However, not sure why, but it worked for some commands but didn't work for some commands. For example, /rp delete still asks for confirmation on attempting to delete where access is denied (confirmed it was still denied as it should be when using /rp yes afterward, though). The command /rp expand-vert is another that does it, if I change the config to make it require confirmation.

commented

The plugin will deny only if the player dont have the permission for that command and not for access, like other regions.