Minecraft Java Plugin - Spectate in Another Player's Sight?

Ja
- in Plugins
3

I'm currently doing a Java plugin for a Minecraft project.
Now I have the problem that when a player dies, I want him to be in the sight of his mate. (Like when you left click on a mob / player in the Spectator game mode)

I can put the player in game mode 3 and teleport to his teammate, but I just can't get the deceased player to be in his mate's view!
On the Internet I only find "setSpectatorTarget" but that only causes the dead player to be teleported behind his mate when his mate is 10 blocks away, but that doesn't mean that you are in the other's view.

Can someone help me there?

Cr

There's the / spectate command

Ja

No, it doesn't exist without other plugins

Cr

/ spectate is available in minecraft vanilla