I am making a points shop for kills. I have the objectives money and kills. When I press a button, a command block tests for my kills (hopefully) above 0, and if that is a thing, it takes gives me one money and takes one kill. But this never happens because it always "Finds" me, and now my kills are in the negative.

TLDR: How to /testfor a number only above zero?

1 Answer 1


A good way to do this is to have it when you press the button, for something costing 3 'points', have a command block with the command /testfor @p[score_TEST_min=3] This will make it so the minimum score you can have is 3. So, if your score is smaller than 3, it can't take away points.

Remember, it can be any number, just substitute the number 3 for the number of points something costs. Lead a redstone comparator out of that command block, and to the command blocks that take the 3 points away from you, and give you the item(s). (I'm assuming you already have the commands for these, if you don't, leave a comment, and I will add them.)

  • But... Does it? I tried that. Jan 22, 2016 at 14:41

You must log in to answer this question.

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