I was wondering how to make all water completely poisonous in Minecraft 1.18.1; as in, give you wither. My current command (gotten from Google) is:
/execute @a ~ ~ ~ detect ~ ~-1 ~ Minecraft:water 0 effect give wither @p 1 0 true
But it turns red at the first @a
. I have no idea what the problem is.
But that's not all there is to the issue. I want to make it so that when you wear special armor the wither does not affect you; or at least, constantly get rid of all wither effects from you every tick. I have, of course, no idea how to do this either.
I am not too experienced with commands, so I can't understand too complicated commands (especially scoreboards, but entitydata is ok), so if it means to click a button, that makes you immune for a certain amount of time, that's also doable. But I'm not sure how to make the water poisonous in the first place, so... help!
I'm playing on Java.