The ending of a word is the plural rule of Y

The ending of a word is the plural rule of Y

When ending with the consonant + y, change y to I and add es, for example:
family-------->families
You can't change y when ending with a vowel + y, for example:
boy-------->boys