[Feature] Punishments can't be removed by lowest staff's ranks + revoke OWN punishment permissions
Cr4zyGeek opened this issue ยท 3 comments
If an ADMINISTRATOR punished a player, then a MODERATOR can't revoke this punishment,
If a MODERATOR punished a player, then an HELPER can't revoke this punishment but an ADMINISTRATOR could do it
+ create permissions bm.command.[unbanip/unwarn/...].own
for each punishment type
So the first request isn't possible. Bukkit's permission system does not allow for checking permissions of offline players.
The second is, I can add .own permissions for unbanning ip, dwarn etc
For the 1st, you could create a system of personalized permissions like bm.staff.<rank>
=> bm.staff.administrator / bm.staff.moderator / bm.staff.helper
, then when someone is punished, the <rank> is stored in the database
In config you :
+ add the possibility to enable/disable the feature
+ create a category to define the rank order like :
staff-order-revoke: true
staff-order:
- administrator
- moderator
- helper
and then if this feature is enabled, when someone wants to revoke someone's punishment, you check in the database the rank of the punisher compared to the actual bm.staff.<rank>
of the player who wants to revoke the punishment
+ then it could be interesting to add the option to disable the possibility to staff members to revoke punishment applied by others staff members with the same rank :
like MODERATOR can't unban a player banned by an other MODERATOR
For the 2nd, it's exactly what i meant ^^