how to activate the spectator mode in Minecraft Bedrock 1.20 Minecraft Servers

how to activate the spectator mode in Minecraft Bedrock 1.20