I was screwing around and attempting to make a mechanism where if a player shoots an entity with a special arrow (that gives a potion effect as a marker), and then activates another command block, it would kill all entities with that potion effect. After searching extensively, I couldn't find any NBT selector that I could use to kill entities with a potion effect, and there most certainly was not any other argument after @e[
. Is there any NBT selector to target it, or any other way that I overlooked?
I found an old answer suggesting scoreboard functions, but it seems to be outdated and have the same issue (commands not being able to discriminate/select entities based on active effects, as far as I can find).