I'm making a server and I need to make a command that gives levitation to a player when he is holding a specific item in his offhand.
I already have this working for the mainhand:
/execute as @a[nbt={SelectedItem:{tag:{display:{Name:"{\"text\":\"CLOUD\"}"}}}}] run effect give LPA3227 minecraft:levitation 1 5 true
But I need it for the offhand.