This plugin will allow users to go into spectator mode if they have the permission node SafeSpectator.spectate and once they do /spectate it will put them into spectator mode, then once you do /spectate again, it will set your gamemode back to Survival, and teleport you back to where you were before you did the command. If the player disconnects they will be brought back to their original location before they did /spectate and their Gamemode will be set to Survival. Doing /specother will toggle spectating for another player if they have the SafeSpectate.spectate.Other if a user has SafeSpectate.bypass it will disable teleportation to the original /spectate location
This plugin is only compatible with versions 1.8 and up!