I want to make a killstreak award system. for that I need to be able to make a player choose to use his killstreak points to get an ability/potion effect or open a certain gate.

I wanted to make the player use a bottle of enchanting to get to level 1 and then make a commandblock test for those players and execute the killstreak ability and then reset the system.

But what if the player does not reach level 1. what if another player gets the XP from the bottle.

Is there a more secure way to acheve the remote activation of a command block for a certain player? Do I have to use a scoreboard variable?

EDIT: I tried to setup a way to see if players are not having a custom named item in their inventory (if they dropped it) and then according to that, preform an action.

I got to the point in which I can tell if none of the players have that item (Red command blocks), kill the item if they throw it on the ground (Yellow + Blue command blocks) and give the item back to the player who has a score for objective execute of 1.

Some Commandblocks

Commands used in the command blocks: one row for each item (TNT called:"Choose Class" and TNT called:"Launch Killstreak")

  • RED: clear @a minecraft:tnt 0 0 {display:{Name:"Choose Class"}}
  • BLUE: testfor @e[type=Item] {Item:{id:"minecraft:tnt",tag:{display:{Name:"Choose Class"}}}}
  • YELLOW: kill @e[type=Item] {Item:{id:"minecraft:tnt",tag:{display:{Name:"Choose Class"}}}}
  • GREEN: give @a[score_execute_min=1] minecraft:tnt 1 0 {display:{Name:"Choose Class",Lore:[Change your class when you get killed]}}
  • WHITE: Command to set the score of execute,a scoreboard objective, to 1 for all players that don't have the item in their inventory.

Now the problem is that I don't know how to give a point to a scoreboard objective of a player does not have the item in his inventory. How do I do that?


You could use set all players' execute score to 1:

/scoreboard players set @a execute 1

Then you could set the score of everyone whom has the item back to 0:

/scoreboard players set @a execute 0 {Inventory:[{id:"minecraft:tnt",tag:{display:{Name:"Choose Class"}}}]}

This should work, as long as you execute them in order.

On a side note, you should use the chain command blocks instead of repeaters. Simply point an impulse (standard) command block into a line of chain command blocks. This is less resource intensive then the repeaters.

  • This works, however instead op using a pulse commandblock i used a repeat command block – BRHSM Dec 30 '15 at 10:17
  • They suggeated me that on the minecraft forums – BRHSM Dec 30 '15 at 10:32
  • Yes, but with your setup there, I was suggesting you keep the repeat-comparator-impulse combo, but replace the repeater-impulse pattern with chain blocks – rustphoenix Dec 30 '15 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.