Create a player kill counter
/scoreboard objectives add kills playerKillCount "Kills"Creates the kills objective, which goes up by one each time the player kills another player.

/scoreboard creates objectives and stores whole-number scores for players, entities and invented names. Scores can count kills, deaths or mined blocks on their own, or serve as variables in maps and data packs. You can show them in the sidebar, in the player list or below player names.
/scoreboard objectives (add|list|modify|remove|setdisplay)/scoreboard players (add|display|enable|get|list|operation|remove|reset|set)/scoreboard objectives/scoreboard objectives (add|list|modify|remove|setdisplay)| Argument | Expects | What it does |
|---|---|---|
| objective | Textone word | Objective name. For objectives add, a new single word like kills or coins; elsewhere an existing objective. |
| criteria | Objective criterion | What updates the score: dummy, trigger, deathCount, health or a statistic like minecraft.mined:minecraft.stone. |
| displayNameoptional | JSON text | Text shown instead of the name, as a quoted string or a text component. |
| value | true / false | true or false: turns automatic refreshing of the display name on or off. |
| contentsoptional | JSON text | Fixed text shown in place of every number, for the fixed format. |
| styleoptional | Text style | Text style for the numbers, for example {"color":"gold"} or {"bold":true}. |
| slot | Display slot | Where to display: sidebar, list, below_name or sidebar.team.<color>. Without an objective, the slot is cleared. |
/scoreboard players/scoreboard players (add|display|enable|get|list|operation|remove|reset|set)| Argument | Expects | What it does |
|---|---|---|
| targets | Score holderone or several | Score holders: @s, @a, @e[type=...], a player name, an invented name, or * for every tracked holder. |
| objective | Scoreboard objective | Objective name. For objectives add, a new single word like kills or coins; elsewhere an existing objective. |
| score | Whole numberat least 0 | Whole number. add and remove take 0 or more; set accepts any value. |
| nameoptional | JSON text | Custom name shown for this holder in the displays, as a text component. |
| contentsoptional | JSON text | Fixed text shown in place of every number, for the fixed format. |
| styleoptional | Text style | Text style for the numbers, for example {"color":"gold"} or {"bold":true}. |
| target | Score holderone | One score holder, whose score is read or listed. |
| targetObjective | Scoreboard objective | Objective of the score that is changed. |
| operation | Operation | Operator: += -= *= /= %= = < > or >< to swap the two scores. |
| source | Score holderone or several | Score holder whose score is read; it stays unchanged except with ><. |
| sourceObjective | Scoreboard objective | Objective of the score that is read. |
/scoreboard objectives add kills playerKillCount "Kills"Creates the kills objective, which goes up by one each time the player kills another player.
/scoreboard objectives setdisplay sidebar killsDisplays the kills objective on the right side of the screen for every player.
/scoreboard players set @a coins 0Sets the coins score of all online players to 0. Create coins first, for example with the dummy criterion.
/scoreboard players add @p coins 5Raises the coins score of the nearest player by 5. Use remove to subtract.
/scoreboard players operation @s total += @s killsAdds your kills score to your total score. The kills score itself does not change.
/scoreboard objectives add mined_stone minecraft.mined:minecraft.stoneEach Stone block a player breaks adds one to their mined_stone score.
/scoreboard objectives modify hp rendertype heartsShows the hp objective, created with the health criterion, as hearts instead of numbers in the player list.
/scoreboard objectives modify coins numberformat styled {"color":"gold"}Colors every number of the coins objective gold wherever it is displayed.
Fill in the fields, then copy the command.
Command generatorAn objective has a one-word name and a criterion. dummy only changes through commands, which makes it the usual choice for variables. trigger is the only type players can change themselves, with /trigger. Others update on their own: deathCount, playerKillCount, health, or statistics such as minecraft.mined:minecraft.stone and minecraft.custom:minecraft.jump. Criteria like health are read-only, so setting them fails with "Scoreboard objective ... is read-only".
setdisplay shows an objective in sidebar, list or below_name, and sidebar.team.red shows it only to members of a team with that color (see /team). numberformat changes how the numbers look, and blank hides them.
Score holders can be players, entities or invented names. Names that start with # never appear in the sidebar, which is handy for counters. operation combines two scores with +=, -=, *=, /=, %=, =, < (keep the smaller), > (keep the larger) and >< (swap). Test scores with /execute if score, and fill them from NBT with execute store result.
"An objective already exists by that name" means the name is taken. "Can't get value of ... for ...; none is set" appears when the holder has no score yet: set it to 0 first.
✓ Checked in Java Edition 26.3 · updated 2 November 2026
Use /scoreboard objectives modify followed by the objective and numberformat blank, for example on coins. The names stay visible and the numbers disappear.
No, scores are whole numbers. To keep decimals, store the value multiplied by 10 or 100 with the scale of /execute store.
Type it in the chat with cheats on: /scoreboard objectives (add|list|modify|remove|setdisplay).
Cheats on, or operator level 2.
/functionCheats/scheduleCheats/returnCheats/randomEveryone/triggerEveryone/teamCheats/computeCheats/stopwatchCheats