Anytime a player right clicks on a villager to trade with it, the plugin will check if the villager has any trades with enchanted books that have any enchantments over a certain level (specified in the config.) If it does, the level of any offending enchantments will be reduced to that maximum level.
Config:
Code (YAML):
# The maximum enchanted book level that should be allowed in villager trades.
# If a villager has a trade with a level greater than this, it will be capped at this value.
max level
: 5