
Suggestion: special switch perm while in Spectator gamemode
Wextra opened this issue ยท 8 comments
Please explain your feature request to the best of your abilities:
As it stands right now, moderators that aren't in OP can not open chests, furnaces and such in towns even if they are in spectator mode or vanish (SuperVanish). After a discussion with llamadeal I was asked to file a suggestion asking for a special permission regarding switch perms while in Spectator gamemode. Doesn't have to be exactly this though, but something that means that spectators can open chests, furnaces and so on.
I'm not really sure about this, since we'd then need to add protections for removing items from containers which could get a bit complex/unreliable. Another idea would be to open an immutable copy of the container for the player but that seems more like something that should be done in a small addon plugin.
How else can we do this then? Because I feel like giving the moderators access even in survival and such could come with some unwanted risks.
Yes, the moderators can switch from survival to spectator mode anytime they want. As for the other option, would that not allowed them to switch in survival too? I kind of want to avoid that since the moderators play the game like the other players, participate war and such, and so I think it would be best for them to not be able to.
Are these moderators going to be able to switch from survival to spectator mode at will?
The code for this would just be listening for a TownySwitchEvent and then if it was cancelled, and the player is in Spectator mode, we un-cancel it.
The other option is just give the players who can change to spectator mode, the towny.claimed.alltown.switch.* node.
Luckperms has a builtin gamemode context you can use to give players in spectator switch permissions