I am working on a LVL requirement system, and to do that I need to be able to compare 2 scoreboard objectives. I have been playing around with some ideas and I am still unsure on how to do it. If you can help me that would be great!

So basically I am trying to test if a player is holding an item with custom NBT that sets a higher level (achieved through a scoreboard command) than the players set LVL (again a scoreboard). I have tried /scoreboard players operation @p[Score_Tested_min=1] LVL1 -= @p[Score_Tested_min=1] lvl1 Obviously it would be hard to explain the complicated setup I have. But basically LVL1 and lvl1 are based on other objectives and the tested thing is a selector so it only works on one player per a tick.

  • 1
    It would help us if you let us know what you've tried in more specific terms. You don't need to give us the full commands you've tried, but at least something for us to start from.
    – MBraedley
    Mar 26, 2016 at 20:54
  • changed it @MBraedley
    – Lectric
    Mar 26, 2016 at 22:54
  • I have figured out the answer (JUST NOW). It is rather complicated but basically i had LVL and lvl switch in my contraption. My appologies for wasting your time and i do not have a valid way of answering
    – Lectric
    Mar 27, 2016 at 16:08
  • You might as well post the answer yourself. That's the entire point of this site: to help the person asking the question as well as anyone else who chimes along with a similar question.
    – MBraedley
    Mar 27, 2016 at 16:10

2 Answers 2


So basically, you have a command that makes 2 scores identical and a score you want to subtract:

/scoreboard players operations (player1) (objectiveA) = (player2) (objectiveB)

(note player one and player two don't have to be different)

Next you would want a command that you subtract from (objectiveB):

/scoreboard player operations (player2) (ObjectiveB) -= (player2) (objectiveC)

Then you have a player selector in the next command. For instance:

/effect @p[score_Output_min=1] minecraft:slowness (time) (amplifier)

and that will show it is working right if you do the same general outline of what I did. Hope this helps. Just heads up this gets complicated real quick and it took me forever to figure out what i did wrong. I hope this helps you understand and recreate the idea if you need it.

  • I should say this isnt multiplayer compatible and i have a more compact efficent one for multiplayer. as i cannot share that info do to multiple reasons that and i forget how i came across it.
    – Lectric
    Apr 1, 2016 at 22:43

Maybe a little late, but in the new 1.13 commands, target selectors support ranges. So after you've done the substraction, and gave the player that should be affected the substracted score, you can use scores={(your score)=1..} for greater than, and instead of 1.. ..-1 for less than in the target selector...

You must log in to answer this question.

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