mojira.dev
MC-9185

the /list command in a command block does not output a signal the size of the number of players online

I was trying to figure a way out to test for the number of players on the server and compare it to a dummy number. I would subtract the two and if everyone's ruReady dummy objective was set to 2 then doors would open. I was using "scoreboard players list" to get the number of players. However, that list outputs the number of people on the scoreboard and the scoreboard doesn't update when someone leaves the game. So for instance if I had 4 players and we all were ready (had ruReady set to 1) then the doors would open, but if that person left before they were ready then the doors would never open even though all the players online are ready because that one last person had not hit the button to be ready. So I thought about using /list instead of /scoreboard players list. List gives only the players online. However list only outputs one block of signal no matter how many people are on.

Comments 8

Is the comparator supposed to send a signal proportinoal with the number of players ?

http://www.minecraftwiki.net/wiki/Redstone_Comparator says

Comparators fed by command blocks will now indicate whether the last run command was run successfully

and

Comparators can be used to get an analog redstone signal indicating the amount of found players by using the new /testfor command.

Oh man you are right. I am so very sorry to waste time...i didn't see the "testfor @a[c]" command. Thanks for this. I will resolve this bug.

I can't resolve it and can't remove it. I will let a mod get rid of it.

Hey what do you mean "testfor @ac"? I get everything BUT the 'c'

crap this system gets rid of brackets. it should be "testfor @a[[c]]"

Tipp: If you want to write brackets, embed it with {code}

testfor @a[c]

oh thanks for that

testing...

testfor @a[c]

Andrew Harwood

(Unassigned)

Unconfirmed

Snapshot 13w05b

Retrieved