on fishing:
if fishing state is "BITE":
send "{@prefix} Reel in your &eFishing Rod&7!" to player
wait 1 tick
if click type is right mouse button:
if player's held item is fishing rod named "&7&lCOMMON ROD" with lore "&d", "&7Fishes:", "&7Cod", "&7Salmon":
chance of 50%:
add 1 to {fishes::cod::%uuid of player%}
send "{@prefix} you have caught &e1&7 cod" to player
chance of 50%:
add 1 to {fishes::salmon::%uuid of player%}
send "{@prefix} you have caught &e1&7 salmon" to player
This is the code I have, i need it so whenever a player rights clicks whenever the fishing state is "bite" to not give the player an item, instead to the other part, but i cant figure out how to check if the player right clicks while fishing is in "bite" state