[MC-11270] Scoreboard don't work with offline / non-existant players Created: 07/Mar/13  Updated: 09/Mar/14  Resolved: 24/Feb/14

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.5, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.7.2, Minecraft 1.7.3, Minecraft 1.7.4
Fix Version/s: Minecraft 14w07a

Type: Bug
Reporter: Yoann Petremann Assignee: Unassigned
Resolution: Fixed Votes: 14
Labels: offline, players, scoreboard

Issue Links:
Duplicate
is duplicated by MC-14769 Scoreboard Reset Resolved
is duplicated by MC-28179 You can't add command block arguments... Resolved
is duplicated by MC-34413 Testfor command not working with a fa... Resolved
is duplicated by MC-50692 testfor does not detect disconnected ... Resolved
Confirmation Status: Unconfirmed

 Description   

Steps:

  1. Start a server and join it as op in creative
  2. Type these commands: (So your scoreboard is prepared)
    /scoreboard objectives add Test dummy
    /scoreboard objectives setdisplay sidebar Test 0
  3. Type these commands: (You are the only tracked player)
    /scoreboard players set <yourPlayerName> Test 0
    /scoreboard players set <friendPlayerName> Test 0
    /scoreboard players set <non-existantPlayerName> Test 0
  4. Type these commands: (This only change your score)
    /scoreboard players set @a Test 1
  5. Let a friend join the server
  6. Type these commands: (Your friend is tracked)
    /scoreboard players set <friendPlayerName> Test 1
  7. Type these commands: (Your friend score and yours is set to 2)
    /scoreboard players set @a Test 2
  8. Tell your friend to leave the server
  9. Type these commands: (You can't change his score when he's offline, whenever he's tracked)
    /scoreboard players set <friendPlayerName> Test 1
  10. Type these commands: (You can only change the score of online players, whenever other are tracked)
    /scoreboard players set @a Test 0

Description:

It's only possible to change score for online tracked players.


Expected:
  • Having the possibility to change the score an already tracked players.
  • Having @a selectors to change the score of all tracked players of the specified objective, additionaly to connected players
  • Having the possibility to add an offline player to the list of tracked player for one objective, if their names is given explicitly.

Actual:
  • Since a player is tracked for a scoreboard and he's not on the server,
  • It's not possible to change his score, when we use his name explicitly or with selectors such as @a.
  • It's not possible to set a name for a player that's not on the server or non-existant player.



 Comments   
Comment by [Mod] Pokechu22 [ 14/Feb/14 ]

Can confirm with sethbling: http://www.youtube.com/watch?v=XnU792590CQ#t=342 (5:40 in).

Comment by [Mod] Skylinerw [ 14/Feb/14 ]

And this has now been fixed in 14w07a. A new argument to the /scoreboard syntax called "test" has been added:

/scoreboard players test <player> <objective> <min> <max>

You can prefix fake players with a # symbol so they don't show up on any scoreboard displays, but is not required for testing. An example command:

/scoreboard players test FAKEPLAYER testObjective 0 1
Comment by Kevin Zhu [ 13/Feb/14 ]

Ah. I see what you mean. You can, however, change offline players directly, without the use of a selector. /scoreboard players set Notch FOO 1 works. Sadly this isn't very useful without testfor, I'd love to be able to specify the player in testfor. Testing for "Foo" will always return yes if there are no online players with that objective.

Really want this to be fixed, so hard-wired variables can be used in adventure maps.

Comment by [Mod] Pokechu22 [ 13/Feb/14 ]

But not by @selector. Nor with /testfor. You can't do /testfor @a[score_isVar_min=1,score_FOO_min=20].

Comment by Kevin Zhu [ 13/Feb/14 ]

THIS HAS BEEN FIXED. In 1.7.4, you can change the score of an offline or non-existent player. Can I get someone to confirm and close this?

Comment by Kevin Zhu [ 13/Feb/14 ]

Would love to see this fixed in the newest snapshot.

Comment by BoxFigs [ 07/Feb/14 ]

This should be fixed in 14w06a with the addition of using * to select all players tracked by the scoreboard.

Comment by [Mod] Skylinerw [ 21/Dec/13 ]

Present in 1.7.4

Comment by Steven Brelsford [ 27/Nov/13 ]

Confirmed for snpshot 13w48b.

Comment by [Mod] Skylinerw [ 21/Nov/13 ]

Confirmed for snapshots 13w47a/b/c.

Comment by EscoreFairplay [ 13/Nov/13 ]

I agree to this thread. Would be neat to use with stat.leaveGame!

Comment by Yoann Petremann [ 12/Nov/13 ]

I agree with you anomitee, having the possibility to have a @t (I've proposed o or f as offline) would let something better.

Comment by Anomitee [ 12/Nov/13 ]

I'm getting this bug in 1.7.2, but some things do work:

You can add, set and remove from a score of an offline, nonexistent, untracked (not on the scoreboard) players as long as you explicitly mention their name like such:

/scoreboard players (add|set|remove) <anyone> <objective> #

Unfortunately, selectors (selecting players using @) don't work, all of the following do not work for offline players:

/scoreboard players add @a points 1
/scoreboard players add @a[name=offlineplayer] points 1
/testfor @a[score_points_min=100]
/testfor @a[name=nonexistantplayer]
/testfor @a[team=theotherside,name=nonexistantplayer]

and any other format that makes use of @.

To recap:

  • all @ selectors cannot/do not target offline players, even if they are tracked
  • /testfor offlineplayer also doesn't detect offline players, but this is intended
  • @a should be able to target offline players if they are tracked
  • alternatively, @t could be added instead to target all tracked players (both online and offline), leaving @a to target online players.
Comment by Yoann Petremann [ 27/Aug/13 ]

I think that a @offline (maybe o or f) with the name argument could let us track all player tacked by scoreboard or their respective dat files

Comment by [Mod] Pokechu22 [ 28/Jul/13 ]

This could/should be fixed by making a additional command (probably in /scoreboard) that compares the score of a player.
It would work like this:

/scoreboard players score <Playername or target selector> <Score> [minimum] [maximum]

Does this make sense?

Edited due to the text becoming linked improperly.

Comment by Ron F. [ 05/Jul/13 ]

Still present in 1.6.2 Pre-Release.

Comment by Ron F. [ 04/Jul/13 ]

While I have not tested using the OPs method, I can say this still exists in 1.6.1 Release. I'm using "non-existant" players to track map specific options. This was tested in single player as I am developing a map that will be intended for ssp and smp.

Create a configuration scoreboard:

/scoreboard objectives add CONFIG dummy CONFIG

Add it to the sidebar

/scoreboard objectives setdisplay sidebar CONFIG

Add yourself and a non-existant player

/scoreboard players add "your_real_player_name" CONFIG 0
/scoreboard players add "non-existant_player_name" CONFIG 0

Create some redstone contraption to check with. I used a redstone clock->command block->comparator->redstone dust->piston

Edit the command block to use this command:

/testfor @a[name="your_real_player_name_here",score_CONFIG_min=0]

The Piston will extend.

Edit the command block to use this command:

/testfor @a[name="your_non-existant_player_name_here",score_CONFIG_min=0]

The Piston will retract as the non-existant player is not online.

A work around could be to use enitre scoreboards for EACH option and attach scores to all players, but that I would think, would add unnecessary bloat to the scoreboard.dat file.
I hope this is not intended behavior. This scoreboard system will have much more potential as custom variable system.

Comment by PassionThinker [ 29/Jun/13 ]

I am glad to see this issue is being tracked; without the ability to set objectives when players are offline, there is no other method (to my knowledge) to test for when players leave mid-game in pvp maps.

Comment by Yoann Petremann [ 25/Mar/13 ]

So I think it's needed to add a special selector that read into the "scoreboard player list" instead of "online player list" ... It's possible now to set a score for non-existant or offline player ... Why not the possibility to test if a tracked player is in a scoreboard.

Comment by Stephen [ 25/Mar/13 ]

There needs to be a command like /scoreboard players setall Test 0. @a isn't going to work on offline players.

Comment by Daniel "Glampkoo" [ 12/Mar/13 ]

Confirmed in 1.5pre Uff! This was difficult to reproduce.

Generated at Sun Jan 12 12:27:06 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.