Minecraft Commands – How to Detect Who Kills a Certain Player?

minecraft-commandsminecraft-java-edition

I'm making a juggernaut game in Minecraft, and I need to know how to detect when someone kills the juggernaut and then do something to that player (like set a dummy objective "juggernaut" to 1 for that player).

Best Answer

Simply change the objective type to stat.teamkill.dark_red (or other color)

Place the juggernaut on a team and set that team's color to match the objective criteria

When you end the game, use the selector @p[score_Juggernaut_min=1] to find out who won.

Related Topic