Commands
Use the /scoreboard command
The /scoreboard command turns Minecraft into a tracker. You make an objective, pin it to the sidebar, and watch numbers climb as players earn them. Below is the exact syntax to build a live kill counter from nothing.
The full setup, one line at a time
- 1Create an objectiveRun /scoreboard objectives add kills playerKillCount. Name is kills, criterion is playerKillCount so it tracks itself.
- 2Show it on screenRun /scoreboard objectives setdisplay sidebar kills to pin the objective to the right-hand sidebar.
- 3Seed starting valuesRun /scoreboard players set Steve kills 0 so the player appears at zero instead of waiting for a first event.
- 4Change scores manuallyUse /scoreboard players add Alex kills 1 or players remove / players set for quests, deaths, or custom counters.
- 5Reset and clean upRun /scoreboard players reset Steve to wipe one entry, or objectives remove kills to delete the whole objective.
What you need
Objective
Sidebar display
Live counter
Score values
Quick answers
?
What does playerKillCount track?
It auto-increments every time that player kills another player. Use dummy instead if you want a counter only commands change.
?
How do I show the scoreboard on screen?
Run /scoreboard objectives setdisplay sidebar <objective>. You can also target list (tab menu) or belowName.
?
Why is a player missing from the sidebar?
The sidebar only lists entries with a score. Run /scoreboard players set <player> <objective> 0 to make them appear.
?
What is the difference between set, add, and remove?
set forces an exact value, add increases by an amount, remove decreases. All take a player, objective, and number.
?
Can a command block update the scoreboard?
Yes. Put /scoreboard players add @p kills 1 in a command block on a clock or a button to drive counters automatically.
?
How do I delete an objective completely?
Run /scoreboard objectives remove <objective>. This removes it from every display slot and deletes all stored scores.
?
Why does objectives add fail with an error?
Names must be unique and cannot contain spaces. Java allows letters, numbers, and the symbols - + . and _; Bedrock still caps the name at 16 characters while Java removed that limit in 1.18. A space or a duplicate name is the usual cause. Wrong criterion spelling fails too; criteria are case sensitive.
?
Can I rename the title shown above the sidebar?
The objective name is fixed once created, but the display name is separate. Add a JSON text component as the third argument, like /scoreboard objectives add kills playerKillCount {"text":"Kills","color":"gold"}, or set it later with objectives modify <name> displayname.
?
Do non-player entries like @e work on a scoreboard?
Yes. Any entity UUID or a fake player name (any string) can hold a score. Use a fake name like #total kills 0 to store global counters that never show as a real player.
?
Why is the sidebar empty after a server restart?
Objectives and scores persist in level data, but the setdisplay slot does not. Re-run /scoreboard objectives setdisplay sidebar <objective> on load, or put it in a function tagged minecraft:load.
?
How do I test a score in a command?
Use the target selector with scores, for example /execute if entity @p[scores={kills=10..}] run say done. The 10.. range means 10 or more; ..5 means 5 or less.
Blocks and items in this guide
All 3 of these are named in the guide above, starting with Warped Fungus. Look them up in the item database.
More guides on this site
Guides that go with this one
How to Install Plugins on a Minecraft Server
Drop a .jar into the /plugins folder, restart the server, and watch the [PluginName] Enabled line...
How to Use WorldEdit in Minecraft
<>WorldEdit turns hours of block-by-block work into one line. Select a region with the wand, then //set,...
How to Whitelist a Minecraft Server
<>A whitelist turns your server into invite-only: only listed accounts get in, everyone else is kicked...
How Mob Spawning Works in Minecraft
Deep dive into Minecraft mob spawning: light levels, mob caps, spawn algorithm, despawn rules, and how...
How to Add Detail to Builds in Minecraft
Flat boxes look unfinished. Here is how to detail a build in layers: trim and framing, depth and shadow,...
How to Beat a Hoglin in Minecraft
Kill hoglins in the crimson forest without getting flung into lava. Use warped fungus to repel them,...
Database →
Command Reference
Syntax, arguments and examples for every command.
Hosting →
Managed Hosting
Skip the setup: a managed server online in minutes.
Database →
Item Database
Every item with its stats, IDs, recipes and uses.
Guides →
More Server & Admin guides
Run a server: setup, hosting, permissions, worlds and crossplay.