I've just been trying around finding a good way to kill a player that's
in the spawnarea when suddenly the idea came to my mind:
When do players always die, no matter in spawn or not??
- if they switch team!
And that's what I'm actually doing:
- Switch player to the opposite team
- Players dies
- Block the "X joined team Y" message
- Block the class selection menu
and then:
- Switch player back to his old team
- Block the "X joined team Y" message
- Block the class selection menu
that way the player is on his old class again when he respawns.
The player will not notice a difference to commiting suicide "the normal way"!
Tested and working!
See attached sample plugin and test it yourself with the command
"testsafekill"