We usually change y to i before adding an s or a suffix when a consonant comes before the y. Examples:
courtesy + s = courtesies
worry + some =worrisome
family + s = families
likely + hood = likelihood
Proper names are an exception to this rule:
Germanys, Kennys
We usually do not change y to i when a vowel comes before the y. Examples:
chimney + s = chimneys
boy + s = boys
We also do not change y to an i when the suffix begins with an i. Examples:
bully + ing = bullying