Custom potions

#1
Cmd create cp
Cmd unregister cp

Cmd add cp if %args%[3] = 373 then goto 2
Cmd add cp if %args%[5] = “Mining” then goto 6
Cmd add cp if %args%[5] = “PvP" then goto 11
Cmd add cp if %args%[5] = “Clear" then goto 16
Cmd add cp exit

Cmd add cp /effect %p% night_vision 300 1
Cmd add cp /effect %p% haste 300 3
Cmd add cp /effect %p% speed 300 3
Cmd add cp message %p% [+] Mining Potion consumed [+]
Cmd add cp exit

Cmd add cp /effect %p% strength 300 3
Cmd add cp /effect %p% speed 300 4
Cmd add cp /effect %p% invisibility 300 1
Cmd add cp message %p% [+] PVP potion consumed [+]
Cmd add cp exit

Cmd add cp /cmd run /effect %p% clear
Cmd add cp [+] your effects have been cleared [+]

Cmd trigger eat cp

To give yourself a custom potion do :

give example 373 1 {display:{Name:"example"}}
 
#6
Hey so I made a command similar to this one (just removed pvp and clear potions) but I would get the mining potion effect even when I just drank a normal water bottle. Any suggestions on how to fix this?