This addon provides an extra functionality in controlling which custom enchantments will appear in a treasured item (found in a treasure chest, villager trading, raid-drops, and fishing).

Once this addon is installed and enabled, you can control which custom enchantments appear in a treasured item using the following config option in each custom enchantment's xxxx_config.yml:

for example (for Laser enchant)

Potions:
  Laser:
    ...
    availabilities:
      - FISHING
      - VILLAGER
      - ENTITY_DEATH
      - LOOT
    availabilities_max:
      FISHING: 3
      VILLAGER: 1
      ENTITY_DEATH: 1
      LOOT: 3
    ...
without TEAddon-Treasure addon, these options do nothing.

Installation:
To install this addon, just place TEAddon-Treasure-x.x.x.jar in 'plugin/TokenEnchant/addons' folder and restart the server or do '/te reload'.

Config:

Addons:
  Treasure:
    defaultFlag: true
    event_map:
      PlayerFishEvent: "LOWEST"
      VillagerAcquireTradeEvent: "LOWEST"
      EntityDeathEvent: "LOWEST"
      ChunkPopulateEvent: "HIGH"
      LootGenerateEvent: "HIGH"
      EnchantItemEvent: "LOWEST"

    ## entry uses the same options from TE's DefaultCEAvailabilities: option
    # ENCHANTMENT_TABLE, LOOT, VILLAGER, FISHING, ENTITY_DETH
    # this option can be overridden in each TE's config with 'availabilities_max:' with the same format.
    default_ce_availabilities_max:
      ENCHANTMENT_TABLE: 3
      LOOT: 2
      VILLAGER: 3
      FISHING: 4
      ENTITY_DEATH: 2