Straight from the Minecraft Wiki:
Entities encompass all dynamic, moving objects throughout the Minecraft world.
The wiki entry on the debug screen has more info (paraphrased):
+------------------------------------------------------------------+
| Name | Legend |
+----------------+-------------------------------------------------+
| E (second row) | Number of rendered entities over total entities |
+----------------+-------------------------------------------------+
So, you are partially correct:
- Entities are mobs (friendly or hostile), items, and quite a few more.
- The 'number rendered' is the number of rendered entities
You don't have to use a selector for a playerscore. You can use any name you want, even if it's not a valid player's name. For instance, the following sets the score of a fake player named "pool":
/scoreboard players add pool money 10
Do keep in mind that if a player named "pool" joins, they will essentially "own" that score. You'd want to be careful when manipulating the scores in case their existence causes a conflict (such as running /scoreboard players add @a money 10
). If you prepend the name with "#" (such as "#pool"), the name will not appear on the sidebar and also prevents naming conflicts because real players cannot have the "#" character in their name.
As for your mechanism, you'll want to use Chain command blocks, which directly specifies activation order, instead of comparators, which does not have a guaranteed activation order and causes delay. The delay can cause the mechanism to lock up if a player kills a zombie before the comparator turns off.
/testfor
is not particularly useful, especially in multiplayer situations. You can replace it with a scoreboard operation that would account for multiple kills in the same tick, rather than assuming there is only 1 kill amongst all players.
Image example of the mechanism:
Commands:
Increment the fake "#pool" player's score equal to all playerscores for the "killedBasic" objective (or change "#pool" to a name you would prefer, removing "#" so that it appears on the sidebar).
/scoreboard players operation #pool money += @a[score_killedBasic_min=1] killedBasic
Set playerscores for "killedBasic" to 0 like usual.
/scoreboard players set @a[score_killedBasic_min=1] killedBasic 0
This is a multiplayer-friendly and multi-kill friendly solution that will not lock up if multiple kills are made in subsequent ticks.
Best Answer
As you already have the objectives set up and working, it's fairly simple to output them. You'll need to use the JSON format to get the player's score, like this:
Where ObjectiveName is the name of the objective you want to get the player's value of.
/title
already accepts JSON data, so all you need to do is:/say
doesn't accept the JSON format, so you should use/tellraw
instead, which does:If you want it as part of a sentence, you could change the JSON part to something like: