I was thinking of trolling my friend in our survival world. Essentially, I’d like to be able to press a button on a command block that will summon tnt or spawn a mob at his location. I know how to spawn a mob or tnt, but I don’t know how to locate him. I’d tell you what I’ve tried, but to be perfectly honest I have no idea where to start. If anyone knows the command it would be greatly appreciated! (I play on Bedrock 1.16 in case that matters.)
2 Answers
Put this in your command block:
execute <player> ~ ~ ~ summon <entity>
Whatever the player's name is, put that on <player>
, and summon any <entity>
given in the command.
You can try something else, however. Changing the coordinates where the player is standing by y + 75
will make it look like they nearly got nuked.
Simply:
execute <player> ~ ~75 ~ summon tnt
The accepted answer works for 1.16, the updated syntax for 1.20+ version is:
/execute at <player> run summon tnt ~ ~ ~