I'm trying to get command blocks to track ONLY one specific player's kills, specifically player kills.

So far I have tried:

/scoreboard objectives add Kills stat.playerKills
/testfor EpicMinecartz [score_Kills=2,score_Test_Kills=1]
/scoreboard objectives remove Kills
/scoreboard objectives add Kills stat.playerKills

All linked up with repeaters.

So, all this is fine but the first command block pulls up an error upon activation:

[11:08:02] /testfor <player>

So, my question is:

In 1.7.9 Is there a way to track one player's kills not using @p or @a or @r to track basically everybody?

  • Does using @p/@a/@r work, or does that throw at error too?
    – TMH
    Jul 29, 2014 at 14:17

4 Answers 4


1.8 and later

/scoreboard players reset removes a player's score in a specified objective completely, making it so that the player doesn't show up in the sidebar display slot.

First, set up a kill counter objective

/scoreboard objectives add killCounter playerKillCount Kills

Set up a 20 Hz. clock (or use 1.9's repeat/chain command blocks) and have it run:

/scoreboard players reset @a[name=!<player>]

where <player> is replaced by the player's name. If you want to track more than one player's kills, you have to figure how to target all players whose kills you don't want to track. Most of the time, you should already know how to select these players based on how they were selected to be shown in the first place. If not, a simple way to do this is to use the scoreboard tags introduced in 1.9:

/scoreboard players tag <player> add trackKills

where <player> is replaced by the player's name or a valid target selector. Run this once for every player to be tracked, then use @a[tag=!trackKills] in the scoreboard reset command above.


Without reset, we'll need two objectives. One to track all players' player kills, and one to store kills for certain players:

/scoreboard objectives add killCounter playerKillCount
/scoreboard objectives add selectKillCount dummy Kills

Set up a 20 Hz. clock and have it run these commands in order:

/scoreboard players add @a[name=<player>,score_killCounter_min=1] selectKillCount 1
/scoreboard players set @a killCounter 0

Replace <player> with the name of the player to track. When tracking more than one player, you'll have to assign them some score in another dummy objective and use that in the target selector instead of name.


What you can do is create a scoreboard with the code:

/scoreboard objectives add [new name of scoreboard] playerKillCount

Then you CAN show it in the sidebar with the code:

/scoreboard objectives setdisplay sidebar [name of scoreboard]

Then to add a player you must:

/scoreboard players add [player name] [scoreboard name] 1
/scoreboard players remove [player name] [scoreboard name] 1

Unfortunately there is NO way to show the scoreboard to one player/team unless you include 1.8, but you asked about 1.7.9 and not 1.8, so the answer is unfortunately no.

Then you may see nothing in the scoreboard but as soon as someone get a kill(must be a player unless you use totalKillCount instead of playerKillCount), it will show up in the scoreboard

  • While this is correct for the general scoreboard display, OP specifically only wants a single player's kill count to be shown, rather than track every player.
    – MrLemon
    Jul 29, 2014 at 15:31
  • Ah Thanks this worked, one final question, Can i show the scoreboard for only selected players Jul 29, 2014 at 15:49
  • In 1.7.9 there is no way unfortunately.
    – arti2400
    Jul 29, 2014 at 19:14
  • I just took another look at this answer. The part about adding or removing players is wrong, those commands add or remove points from the score. playerKillCount updates automatically. See minecraft.gamepedia.com/Scoreboard#Command_reference
    – MrLemon
    Jul 30, 2014 at 14:40

You can create a new objective:

/scoreboard objectives add EpicMinecartzSelector dummy

Then add yourself with a score of 1:

/scoreboard players add EpicMinecartz EpicMinecartzSelector 1

And then in your testfor, just add

/testfor @a[score_Kills=2,score_Test_Kills=1, score_EpicMinecartzSelector=1]

     Made By The Diamond Minecart Show! ScoreBoard ;)
enjoy the scoreboards                            www.planetminecraft.com › Blogs
/scoreboard objectives add Map dummy
/scoreboard teams add Home
/scoreboard teams add NotHome
/scoreboard teams option Home Color Red
/scoreboard teams option NotHome Color Green
/scoreboard objectives setdisplay list map Corner
/scoreboard objectives setdisplay sideBar map
/execute @e[type=Player,r=50] ~ ~ ~ detect ~ ~-1 ~
/scoreboard teams join AtHome @p
/scoreboard objectives add Location dummy
/scoreboard objectives setdisplay sidebar Location

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .