This is the down side of using comparators. NOT MP friendly. When one player enters, the command block is already triggered.
Solution 1:
This will constantly re-apply the perk to anyone in range.
Setup:
/scoreboard objectives add inRange dummy
Clock(20tps Fill Clock)
/scoreboard players set @a inRange 0
/scoreboard players set @a[x=<X>,y=<Y>,z=<Z>,r=<Range>] inRange 1
Run commands that will give the perks using the player selector @a[score_inRange_min = 1]
Solution 2:
Simpler version of Solution 1
Clock(20tps Fill Clock)
Run commands that will give the perks using the player selector @a[x=<X>,y=<Y>,z=<Z>,r=<Range>
Solution 3:
Give perk upon entering range.
Setup:
/scoreboard objective add inRange dummy
Clock(20tps Fill Clock)
Run Commands that will give the perks using the player selector @a[x=<X>,y=<Y>,z=<Z>,r=<Range>,score_inRange = 0]
/scoreboard players set @a inRange 0
/scoreboard players set @a[x=<X>,y=<Y>,z=<Z>,r=<Range>] inRange 1
Explanation:
Solution 1:
First reset the score of all players. Then mark all players within range on a scoreboard, and finally run a command on all marked players.
Solution 2:
Straight up run a command on all players within range
Solution 3:
Run a command on all players that are in range but have not been marked aka. just entered the range. Then reset the score and mark all players in range.
I don't know why so many players say this isn't possible. In fact, it is simple!
Just enter this command into a command block:
/summon Wolf ~ ~1 ~ {Owner:Notch}
Of course, the name Notch
could be replaced with the player's name that you wanted to have it tamed to. @p
does not work! (The command will generate a tamed wolf one block above the command block, tamed to the person of your liking.)
Best Answer
There is no command to change a player's name.
As a workaround, you could fake it by hiding the player's name whilst teleporting a named entity onto them.
To hide a player's name tag, put them on a separate team and change the
nametagVisibility
option:Then summon a named entity, such as a marker armorstand:
You can teleport that entity to the player on a clock with something like: