How to award player on every kill in Minecraft using command blocks?

How to award player on every kill in Minecraft using command blocks? - Crop hacker silhouette typing on computer keyboard while hacking system

I want to award the players in my game with 2 cooked porkchops every time they kill another player.

What I have tried so far, is setup one command block which gives every player with the killsloot scoreboard objective 2 porkschops, and setup another one which removes one from the killsloot scoreboard objective for all players for whom the objective is higher than one. The killsloot objective tracks kills.

The command blocks have the following commands, from left to right:

  • /give @a[score_killsloot_min=1] minecraft:cooked_porkchop 2
  • /scoreboard players remove @a[score_killsloot_min=1] killsloot 1

This does not seem to work however. Minecraft seems to remove the kills from the objective before it gives the item, and as a result, I receive no items. I can confirm this by, when I give myself a killsloot count of two, it runs the give command once, and when I give myself a killsloot count of three, it runs the give command twice.

I have tried swithing the command blocks in position, but that did not seem to change the order the command are run in.

setup

How do I give a player two porkchop for every kill they get? I am on Minecraft version 1.8.

I would like to point out this question is not a duplicate of gaming.stackexchange.com/questions/194564/…, as it does not ask for a progressive award system, and the difference in how its achieved is quite significant.






Pictures about "How to award player on every kill in Minecraft using command blocks?"

How to award player on every kill in Minecraft using command blocks? - Focused ethnic female DJ playing music at nightclub
How to award player on every kill in Minecraft using command blocks? - Young male gamer wearing VR headset for exploring cyberspace and playing video games looking at camera
How to award player on every kill in Minecraft using command blocks? - Serious man in headset for playing video game



What is the command to kill all player in Minecraft?

Kill Command In all Minecraft editions, the command for killing everything in the world is \u201c /kill <target> \u201d. Typing \u201c /kill \u201d any target in the console will destroy pretty much everything that can be removed, including the player.

How do you make a kill scoreboard?

@p (Nearest Player) If a command block has executed the command, the nearest player to the command block will be targeted. If you run a command from the Chat window, the player running the command will be the nearest player.

How do you get a command block to target a player?

Examples
  • To kill the player executing the command: kill @s.
  • To kill the player Steve: kill Steve.
  • To kill item entities: kill @e[type=item]
  • To kill all entities within 10 blocks: ...
  • To kill all entities except players: kill @e[type=!player]
  • To kill all creepers within 10 blocks:




  • Minecraft 1.16 Kill Reward System // Command Block Tutorial




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Anete Lusina, Fardad Postwala, Eren Li, Eren Li