Java has a game mode titled "Spectator" where one view the world as a ghost-like form, going through walls and able to "possess" players' bodies and see what they would see on their screen, without the person being able to tell.
Can the "Spectate Player" part be obtained in Bedrock Edition?
Minecraft Bedrock Edition – Creating Spectator Mode via Commands
minecraft-bedrock-editionminecraft-commands
Related Topic
- Minecraft – How To Automatically make particles when a player Joins Using Commands On Minecraft Bedrock Edition
- Minecraft Bedrock Edition – How to Make a Custom Potion
- Minecraft Bedrock Edition Commands – How to Generate Randomness with Commands in Minecraft Bedrock Edition
- Minecraft – How to start an illager raid via commands
Best Answer
What's Possible
I will share how to make the spectate player part via commands, because a usable, non-nuisance no-clipping through blocks is not (that I am aware) possible in Vanilla Minecraft Bedrock. This will not show how to use a system such as item-dropping to change the player you spectate, as you will have to do that part yourself.
Real Quick
I will be using the selector
and referring to them as
viewed
for the player being watched, andfor the spectator, which I will refer to as
spectator
. Use the /tag command to apply and remove tags from entities.Approach
You will teleport an invisible player behind the spectating player, depending on the viewed's looking position. How do we know someone's look position?
These carets each mean something. It is kinda confusing, but for this tutorial we focus on that last caret.
^ ^ ^2
refers to the block in front of where the player's head is looking, 2 blocks in front of the head. This means that if we use a negative value (i.e.^ ^ ^-3
) we get the blocks behind the player's looking location.(Do not confuse this with tildes
~
! They are separate, as tildes just return the block the player's legs are in.)How
We will use /execute along with /tp. Make a repeating command block; grab a repeating command block by entering this command into your chat window:
Put this command into it:
What did we do? Well first, we used the execute command for the sole purpose of getting access to those carets (
^ ^ ^
) we use for look location. We are getting the look location of the player with tagviewed
. (Remember, you can change the selector as you desire). We put -4 on the end to get the 4 blocks behind that player's look direction. You can adjust this if you want to, just use a negative number. The facing and the more carets just tell us where our spectator should be looking, which is right where the viewed is looking. Thefalse
is to prevent the hazard test (you don't need to understand this).The reason we must use a negative value is because if the spectator is in front of the viewed, the viewed wouldn't be able to place blocks, open chests, break blocks, as they would always hit the spectator!
When the Person starts Spectating
Before that person starts spectating, you need to use these commands on them, you could do this when you first give them the
spectator
tag.Make them invisible for a while, and show no particles.
You don't want them breaking/placing blocks, do you?
Make them immune to damage.
So they can't hit entities, they won't even deal any knockback or be able to break armor stands!
Also make sure they do not have a bow, armor, milk, potions etc., if you need to be sure use
/clear
.You're Ready!
Once you have a system in place for who is being viewed, spectated, and the effects are given accordingly, set the repeating command block's
Needs Redstone
select box toAlways Active
.Limitations