I'm trying to make an entity execute a scoreboard operation in minecraft 1.9, the entity should set the score of another entity to it selfs score.

Setting up testing environment:

/summon ArmorStand ~ ~ ~ {CustomName:"setter"}
/summon ArmorStand ~ ~ ~ {CustomName:"getter"}
/scoreboard objectives add test dummy
/scoreboard players set @e[name=setter] test 111

As you can see, @e[c=1] executed by setter should select himself (this is true for every entity):

/execute @e[name=setter] ~ ~ ~ say my name is @e[c=1]
[setter] my name is setter

But when using the selector in an scoreboard operation this doesn't work:

/execute @e[name=setter] ~ ~ ~ scoreboard players operation @e[name=getter] test = @e[c=1] test
No test score for MY-MINECRAFT-NAME found
Failed to execute ...

In the scoreboard operation e[c=1] seems to target me (MY-MINECRAFT-NAME).

Is there any way to achive what I'm trying to do? And why doesn't this work for scoreboard operations?


While c=1 does create a sender bias, it also has the potential to create a "player" bias, which will attempt to target players first before targeting non-player entities. A player bias is dependent on the command/feature. The only cases where a player bias occurs is with /scoreboard commands (not counting /scoreboard teams join ... or /scoreboard players tag ...) and stored CommandStats.

The solution is to prevent targeting players, such as either with the type=!Player parameter:

/execute @e[name=setter] ~ ~ ~ scoreboard players operation @e[name=getter] test = @e[type=!Player,c=1] test

Or targeting the specific type of entity with @e[type=ArmorStand]:

/execute @e[name=setter] ~ ~ ~ scoreboard players operation @e[name=getter] test = @e[type=ArmorStand,c=1] test

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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