Java 26.2
Scoreboard
nbtforge
Add
/scoreboard objectives add nbtforge dummy {text:"NBTForge"}Objectives and scores
Scoreboards drive most command-pack logic, and the syntax splits across two subtrees: objectives and players. Pick the criterion, the display slot and the operation here so the objective you create is the one your later commands can actually read.
Create an objective
/scoreboard objectives add kills playerKillCount {text:"NBTForge"}playerKillCount tracks PvP kills automatically once the objective exists.
Show it on the sidebar
/scoreboard objectives setdisplay sidebar killssetdisplay sidebar puts live scores on the right edge of the screen.
Give a player points
/scoreboard players add @p kills 5players add is how command logic grants score by hand.
Rows appear only where the output actually changes -- copy the one that matches your world.
Java 1.16
/scoreboard objectives add kills playerKillCount {"text":"NBTForge"}Java 26.2
/scoreboard objectives add kills playerKillCount {text:"NBTForge"}Bedrock 26.x
/scoreboard objectives add kills playerKillCount {"text":"NBTForge"}/scoreboard objectives add <name> <criterion> [display] creates it. The criterion (dummy, health, a stat, a custom trigger) decides what it tracks; dummy is the usual choice for values you set yourself from commands.
/scoreboard objectives setdisplay sidebar <name> puts it on the right of the screen; belowName and list are the other slots. Only one objective can occupy each slot at a time.
/scoreboard players add <target> <objective> <n> increases it, set overwrites it, and operation does maths between scores. These player subcommands are how most command-pack logic keeps state.
Java 26.2
Add
/scoreboard objectives add nbtforge dummy {text:"NBTForge"}