Players can use spectate mode and when they are done they will be forced teleported back to the location they started spectating and also set to the same gamemode as they were before.
It is also possible to set a timer for how long a player can be in spectate mode before being teleported back.
Commands
Start and stop spectate mode
/rspectate
/rspectate <PlayerName>
Permissions
rspectate.spectate:
description: Toggle spectate mode
default: true
rspectate.spectatetoggleother:
description: Toggle spectate mode for other players
default: false
rspectate.spectateteleport:
description: Allow players to teleport to other players while in spectate mode
default: true