how do you use /scoreboard to test for a non specific item

how do you use /scoreboard to test for a non specific item - Medical single use disposable syringe without protective cover on needle and with empty barrel placed on bright yellow surface

I just had help with :

/scoreboard players set @a[team=Ninja] jump 0 {SelectedItem:{id:minecraft:ender_eye}}

But I was wondering if you could have it so it was any item this would be a great help as other wise I would have to use multiple command blocks this wouldn't be a problem if I wasn't doing a one block command.



Best Answer

You could just test for SelectedItem:{}, as the same method can be applied for itemframes. But if it doesn't work then you could test for Count:0b and invert the signal.




Pictures about "how do you use /scoreboard to test for a non specific item"

how do you use /scoreboard to test for a non specific item - Student Taking Photo of the Test Paper
how do you use /scoreboard to test for a non specific item - Photo of Clear Glass Measuring Cup Lot
how do you use /scoreboard to test for a non specific item - Young woman watching movie in headphones in messy room



How does the scoreboard command work?

Scoreboard Command
  • To add an objective: /scoreboard objectives add <objective> <criteria> [displayName]
  • To remove an objective: /scoreboard objectives remove <objective>
  • To list all objectives: /scoreboard objectives list.
  • To set how the objectives are displayed: /scoreboard objectives setdisplay <slot> [objective]


  • How do you use the scoreboard operation in Minecraft?

    Via the /scoreboard objectives setdisplay command (see command reference), players' scores in specific objectives can be displayed in certain 'slots' in-game. Each 'display slot' can show one objective at a time, and multiple 'display slots' may be used for the same or different objectives.



    Minecraft Scoreboard Command Tutorial [1.18]




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

    Images: Karolina Grabowska, RODNAE Productions, Rodolfo Clix, Andrea Piacquadio