-
Bug
-
Resolution: Duplicate
-
None
-
Minecraft 1.8, Minecraft 1.8.1
-
None
-
Multiplayer Vanilla Server
-
Unconfirmed
Executing a /stats command is wierd in Multiplayer:
On a fill clock I have a command /execute @a ~ ~ ~ /xp 0L @p
I want to store the XP value in a scoreboard using QueryResult.
In singleplayer this works fine:
/stats @a set QueryResult @p currentXP
However, as soon as I join a server, I want to track the XP for every player - I expected the above command to do exactly this.
However, for some reason the @p selector appears to be executed from the command block - I can't really tell which player the command block takes to score the QueryResult in.
/stats entity oleoleMC set QueryResult oleoleMC currentXP
works fine for a single player however.
Edit: Skylinerw found this out:
Digging a bit into this: it appears that it's the player selector itself in the /stats command that's the problem. Non-op'd players aren't able to use player selectors in commands that are available to them, and it seems that functionality leaked over to CommandStats, even though they shouldn't be expected to be hindered like that. Replacing @p with my in-game name allows it to work, but obviously that's a very poor alternative. I've found the bug report you've made (couldn't find any others either) and will mention this there.
Duplicate with MC-72574.
TL;DR:
Expected:
/stats @a set QueryResult @p currentXP
stores the query result of each individual player in his currentXP score
Reality:
/stats @a set QueryResult @p currentXP
stores the query result of every player in the currentXP score of the player closest to the command block
- duplicates
-
MC-72574 /stats command doesn't work on players who aren't op
- Resolved