I want to know what it is called and I would like a list of things (or a link to a list of things) you can do with it.
I only know @p[score_name_min=1]
.
I want to know if there is something like: @p[activingeffect???]
.
I'm building something that will only affect the player if he has no active effect, e.g. give speed when the player does not have a speed effect yet.
I would like to use only 1 command:
/effect @p[No speed effect] 1 1.
Best Answer
That thing is called target selector argument.
As of Mineraft 1.8.9, there are 20 different arguments available for use:
The 1.9 snapshot 15w32b added another argument.
As you can see, there is no way to check for active effects using target selector arguments. Checking for an entity's active effects can only be done by looking at it's data tag, e.g. checking if it matches
{ActiveEffects:[{Id:1b}]}
. The/effect
command is not able to do that by itself, which means that you won't be able to do what you describe in a single command.Using scoreboards, you can "translate" data tag matching into a score or a tag (1.9 only), which you can then use with target selector arguments.
Create a dummy objective to store the score:
Create a 20Hz. clock (setblock/fill clock, in 1.9, use repeat/chain command blocks) and run the following commands:
Afterwards, you can run
on the same clock.