minecraft command block testfor certain player

minecraft command block testfor certain player - Two Men Playing Volleyball Near Red Canopy

I am trying to make a command block that when powered, it will looks for a specific player in a 5 block radius of the command block. I tried

/testfor @p[r=5][name=<name of player>]

but it doesn't work.



Best Answer

You can't use two [] next to each other.

/testfor @p[r=5,name=<PlayerName>]

Use a comma to separate different values. Don't add another [] next to it.




Pictures about "minecraft command block testfor certain player"

minecraft command block testfor certain player - White Metal High-rise Viewing Deck Building
minecraft command block testfor certain player - Men Running Playing Football during Daytime
minecraft command block testfor certain player - Man in Blue Jersey Shirt and Shorts Playing Soccer



How do you test a specific player in Minecraft?

You can test for a certain target in the game using the /testfor command in Minecraft.

How do you test a player on a particular block?

You can test whether there is a certain block at a specific location in the game using the /testforblock command in Minecraft....TestForBlock Command in Minecraft Java Edition (PC/Mac)
  • x y z is the coordinate to test. ...
  • block is name of the block to test for. ( ...
  • dataValue is optional. ...
  • dataTag is optional.




  • How to detect a player using command blocks! | /execute command tutorial for 1.16 Minecraft Java




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Jim De Ramos, Pixabay, Pixabay, Thirdman