Minecraft Bedrock Edition – How to Give a Player Some Item at a Given Location?

minecraft-bedrock-editionminecraft-commands

So I want to make some minigame where players can get a certain item when they get into a specific location, where then they can craft with it and then PVP.

So I thought of using the /execute command to then /give them with that specific coordinate.

/execute @a x y z give @p stick

Putting this in an Always Active Repeating Command Block, it still gives me the item even if I'm not in that location.

How can I give items to a player in they're in the given coordinates?

Best Answer

You can use the command:
/execute @e[x=#,y=#,z=#,dx=#,dy=#,dz=#] ~ ~ ~ give @s stick

Substitute the # hashtags for coordinates, and everything prefixed with d for distances.

Related Topic