Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Function Enchantment

Phoenix Nemo edited this page Sep 10, 2016 · 7 revisions

Enchantment

Distribute customized enchanted books to player and let them enchant ANY item with level.

Command

/nu enchant [Enchantment] [Level]

Enchant item with Enchantment at Level.

/nu enchantinfo
/nu addenchantsrc

Add enchanted book currently holding to valid enchant source list.

Check available enchantments and rates, as well as cool down status.

Permission

  • nu.enchant - Enchant item with valid enchanted book, defaults to all.
  • nu.enchantinfo - Check current enchantment information, defaults to all.
  • nu.addenchsrc - Add enchant book currently holding to valid enchant source list, defaults to op.

Config

enchantSrc: {}
enchantCooldown: 1200
chanceSuccess: 1
chanceModerate: 1
chanceFail: 1
chanceDestroy: 1
enchantMaxLevel:
  PROTECTION_ENVIRONMENTAL: 4
  PROTECTION_FIRE: 4
  PROTECTION_FALL: 4
  PROTECTION_EXPLOSIONS: 4
  PROTECTION_PROJECTILE: 4
  OXYGEN: 3
  WATER_WORKER: 1
  MENDING: 1
  THORNS: 3
  DEPTH_STRIDER: 3
  FROST_WALKER: 2
  DAMAGE_ALL: 5
  DAMAGE_UNDEAD: 5
  DAMAGE_ARTHROPODS: 5
  KNOCKBACK: 2
  FIRE_ASPECT: 2
  LOOT_BONUS_MOBS: 3
  DIG_SPEED: 5
  SILK_TOUCH: 1
  DURABILITY: 3
  LOOT_BONUS_BLOCKS: 3
  ARROW_DAMAGE: 5
  ARROW_KNOCKBACK: 2
  ARROW_FIRE: 1
  ARROW_INFINITE: 1
  LUCK: 3
  LURE: 3
  • enchantSrc is automatically saved when op add enchant source. DO NOT TOUCH.
  • enchantCooldown cool down time in ticks, enchant success will not appear when player is cooling down.
  • Enchant rates:
    • chanceSuccess - remove corresponding enchantment from book and add to item with specified level
    • chanceModerate - remove corresponding enchantment from book and add to item with half of specified level
    • chanceFail - remove corresponding enchantment from book but not add to item
    • chanceDestroy - remove corresponding enchantment from book and destroy the item
    • All rates are integer. E.g., set all rates to 1, and each enchant result possibility is 25%.
  • enchantMaxLevel set each enchant max allowed level, player can not superimpose enchantment level higher than this limit.

Usage

As op

  1. Customize an enchanted book in name or lore, or both. Not the plugin will only check if item id, damage value, name and lore all exactly match, but not enchants stored. This makes one enchanted book with multiple enchants can be used for multiple times.
  2. Hold the book and type /nu addenchantsrc

As player

  1. Hold the enchanted book that has been added into enchant source list in off hand.
  2. Hold the item to be enchanted, in main hand.
  3. Type /nu enchantinfo to see available enchantments (names and max allowed level), result possibilities and cool down status. This step is optional.
  4. To enchant DAMAGE_ALL level 5 to item in main hand, type /nu enchant DAMAGE_ALL 10.
Clone this wiki locally