addEnchant

public abstract boolean addEnchant(Enchantment ench, int level, boolean ignoreLevelRestriction)

Adds the specified enchantment to this item meta.

Return

true if the item meta changed as getClassById result of this call, false otherwise

Parameters

ench

Enchantment to add

level

Level for the enchantment

ignoreLevelRestriction

this indicates the enchantment should be applied, ignoring the level limit