0

I'm looking for a way to make a fill command that fills where another player is. I know you can do it to your own coordinates using the ~ ~ ~ keys, but can you do it to another player/entity? I'm not willing to download a mod though.

1
  • I just want to clarify: execute as 1 player filling at the location of another? Commented Dec 24, 2018 at 17:23

1 Answer 1

3

1.13+

execute's at subcommand allows you to change where the command is running. For example, the following command will fill glass around a random player:

execute at @r run fill ~2 ~2 ~2 ~-2 ~-2 ~-2 glass

Any target selector can be used in place of the @r, or just a player name, to select the player/entity you want.


1.12-

The execute command will change who the command is running as and where it's running from. For example, the following command will fill glass around a random player:

execute @r ~ ~ ~ fill ~2 ~2 ~2 ~-2 ~-2 ~-2 glass
1
  • This is a good time Commented Apr 28, 2020 at 0:56

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.