That in mind, let us continue. Let’s set the value of “holding” to a player to 1 when they’re holding a white stained glass. To do this, use this command: Now, whenever a person is holding a white stained glass, their “holding” score will be set to 1. Now, whenever a player is holding a white stained glass, they get invisiblity.
How to execute at player holding a specific item in RuneScape?
The execute command sadly does not support data tags, but can be matched up with a test for command block on a repeater clock with a secondary command of /summon, or so put as You can also add particles to make it more detailed, or setblock to fire like this:
What happens when a player isn’t holding the glass?
Whenever a player isn’t holding the glass anymore, they still get the effect! To fix this, add a last command block that constantly sets the “holding” score of a player to 0. Make SURE this comes AFTER the first two, otherwise it could mess up the machine.
How to test if a player is holding a white stained glass?
To do this, use this command: Now, whenever a person is holding a white stained glass, their “holding” score will be set to 1. Now, whenever a player is holding a white stained glass, they get invisiblity. But we have a problem! Whenever a player isn’t holding the glass anymore, they still get the effect!
How to select players with score in objective name?
[score_name=SCORE] — Selects only targets with a score in objective name of no more than SCORE. [score_name_min=SCOREMIN] — Selects only targets with a score in objective name of no less than SCOREMIN. For example, @a [score_points_min=30,score_points=39] will select all players with a score in objective “points” between 30 and 39 (inclusive).
How to detect if a player doesn’t have an item in?
Normally you’d also use a Count property when checking for an inventory item. So if you set Count to 0 you’d check if no items are present in the players inventory. I do that all the time man! Sometimes it just takes a “stepping back” second and you usually realize you are over-complicating stuff. lol