Multiverse-Core icon indicating copy to clipboard operation
Multiverse-Core copied to clipboard

Per gamemode type bypass permissions

Open dc6iq opened this issue 4 years ago • 7 comments

While being in spectator gamemode, you can teleport to a spectated player using numeric keys. If the spectated player is in another world, your gamemode is being changed from spectator to the word's mode. If the spectated player is flying, you will be in air as well and most likely fall down and die because your gamemode was being changed.

Feature request

** If a permission mv.bypass.onspectator.* is set and you are in spectator mode, no gamemode change will happen.

Feature description a new permission set mv.bypass.onspectator.world / mv.bypass.onspectator.* should be added. If it is set and your current gamemode is spectator, this gamemode will be kept while being teleported to another world.

How the feature is useful You won't die anymore and you will not be spotted if you traverse a worlds in spectator mode.

** Fix ** Just pull the fix from https://github.com/dc6iq/Multiverse-Core.git, thank you

dc6iq avatar Jan 27 '21 09:01 dc6iq

Pull request added...

dc6iq avatar Jan 27 '21 09:01 dc6iq

There is already mv.bypass.gamemode.WORLDNAME. See: https://github.com/Multiverse/Multiverse-Core/wiki/Big-List-O'-Permissions#access-permissions

Only thing is if you want only spectator to bypass gamemode on world change but not other gamemodes. For this, more changes will be needed.

benwoo1110 avatar Jan 27 '21 09:01 benwoo1110

Yes, mv.bypass.gamemode.* does too much.

if i am not in spectator mode, then i am just a "normal" player, so a normal gamemode change should happen. In fact the (simple) fix is already coded an tested, just have a look at my pull request and the diff. Defaults (false) do not change the current behaviour, for game operators you have to enable the feature.

dc6iq avatar Jan 27 '21 09:01 dc6iq

Essentially what you are looking for is per gamemode type bypass permissions, which is a good suggestion.

My concerns are

  1. If it were to be added, I think we should have permission node for all gamemodes, not just spectator as well.
  2. mv.bypass.gamemode.<gamemode>.<worldname> may be a better perm node then
  3. And in all honestly, we need a full permission revamp general lol, so not so keen in added more permission node to an old system. Can only come after #2514 tho

Let see other devs opinion first, @nicegamer7 @dumptruckman

benwoo1110 avatar Jan 27 '21 10:01 benwoo1110

I feel like you should be able to use contexts from a permissions plugin like LuckPerms to do this. If you just turn on mv.bypass.gamemode.WORLDNAME when your gamemode is spectator it should do what you want.

willkroboth avatar Feb 13 '21 18:02 willkroboth

I agree with your third point ben, and what willkroboth suggests should also work.

nicegamer7 avatar Feb 13 '21 18:02 nicegamer7

I think MV shouldn’t handle this as LuckPerms can already do it with what I’d think of as a much more intuitive method.

zax71 avatar Mar 15 '23 22:03 zax71