Updated:
1. Count one mob type
/scoreboard objectives add zkill minecraft.killed:minecraft.zombie "Zombie kills"
/scoreboard objectives setdisplay sidebar zkill
Swap in any mob ID, such as minecraft.skeleton. See the zombie commands for tougher targets.
2. Count every kill
/scoreboard objectives add kills totalKillCount "Kills"
totalKillCount counts mobs and players; playerKillCount counts players only.
3. Kill 10, get a reward
# repeat, always active
execute as @a[scores={zkill=10..},tag=!quest1] run give @s minecraft:diamond 3
# chain, always active
execute as @a[scores={zkill=10..},tag=!quest1] run tellraw @a [{"selector":"@s","color":"gold"},{"text":" finished the zombie bounty!"}]
tag @a[scores={zkill=10..},tag=!quest1] add quest1
The tag makes the reward one per player.
4. Deaths by a mob
/scoreboard objectives add zdeath minecraft.killed_by:minecraft.zombie
For all deaths, see the death counter.
5. Reset the quest
/scoreboard players set @a zkill 0
/tag @a remove quest1
6. Show progress on screen
# repeat, always active
execute as @a run title @s actionbar [{"text":"Zombies "},{"score":{"name":"@s","objective":"zkill"}},{"text":" / 10"}]
The action bar shows each player their own count, such as Zombies 3 / 10. execute as @a makes @s each player; plain title @a would show everyone the same number.
7. Team totals
/scoreboard objectives add teamkill dummy "Team kills"
# repeat, always active
scoreboard players set Red teamkill 0
# chain, always active
execute as @a[team=red] run scoreboard players operation Red teamkill += @s zkill
Reset the total, then add every red player's kills. Show teamkill on the sidebar and teams race on their combined score. Add one more pair of lines for blue. See the team command.
Troubleshooting
- Kills not counted: only the player who lands the kill gets it; mobs dying to lava with no player hit do not count.
- Missing names: set everyone to 0 first.
- Bedrock: there are no kill objectives. Use it alongside wave defense on Java.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.