I'm trying to make a system so that when a player wears a leather helmet (Named: AirHelm ) that it will give the player water breathing potion effect.
Also, how do I spawn a leather helmet that's unbreakable?
Thanks for the help in advance,
Frost77011
Also, how do I spawn a leather helmet that's unbreakable?
Thanks for the help in advance,
Frost77011
5
If you attach the effect command to a fill clock and only give the player water breathing for one second, then as soon as they remove it, the command will fail and the effect will stop.
And have a command which sets the helmet score to zero on a slower clock, such as a comparator clock, this will only have an effect when the command on the much faster fill clock fails.
And have a command which sets the helmet score to zero on a slower clock, such as a comparator clock, this will only have an effect when the command on the much faster fill clock fails.
have a dummy scoreboard objective.
Now have a command block on a clock. The command:
/scoreboard players set @a OBJECTIVE 1 {Inventory:[{Slot:103b,tag:{display:{Name:"AirHelm"}}}]}
For the unbreakable helmet, simply add on the "Unbreakable:1" data tag.
Now all you have to do is effect players with the scoreboard value with water breathing.
/effect @a[score_OBJECTIVE_min=1] water_breathing <DURATION> <AMPLIFIER>
Now have a command block on a clock. The command:
/scoreboard players set @a OBJECTIVE 1 {Inventory:[{Slot:103b,tag:{display:{Name:"AirHelm"}}}]}
For the unbreakable helmet, simply add on the "Unbreakable:1" data tag.
Now all you have to do is effect players with the scoreboard value with water breathing.
/effect @a[score_OBJECTIVE_min=1] water_breathing <DURATION> <AMPLIFIER>
How do i set it so that when they take the helmet off the objective gets set to 0?
I can make a leather helmet unbreakable heres the command:
/give PlayerNameHere leather_helmet 1 0 {Unbreakable:1,display:{Name:Air Helm,Lore:[Lets you breather underwater...]}}
You can set up something with scoreboard. I'm not excellent in the redstone field. Might even be /testfor stuff
/give PlayerNameHere leather_helmet 1 0 {Unbreakable:1,display:{Name:Air Helm,Lore:[Lets you breather underwater...]}}
You can set up something with scoreboard. I'm not excellent in the redstone field. Might even be /testfor stuff
I am not the best person for this sort of thing but you could use and if statement to ru this command if you make a plugin or mod for it I don't think it would be to difficult
