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?
    – user173558
    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
    – jbrahy
    Commented Apr 28, 2020 at 0:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.