This repository has been archived by the owner on Mar 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Function Enchantment
Phoenix Nemo edited this page Jan 7, 2018
·
7 revisions
Distribute customized enchanted books to player and let them enchant ANY item with level.
/nu enchant [Enchantment] [Level]
Enchant item with Enchantment
at Level
.
/nu enchant info
Check enchant possibility rates and available enchantments, as well as cool down status.
/nu enchant addsrc
Add enchanted book currently holding to valid enchant source list.
-
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.
File config.yml
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
-
enchantCooldown
cool down time in ticks, enchant result will not bechanceSuccess
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.
File enchantsrc.yml
is automatically saved when op add enchant source. DO NOT TOUCH.
- Customize an enchanted book in name or lore, or both. Note 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.
- Hold the book and type
/nu addenchantsrc
- Hold the enchanted book that has been added into enchant source list in off hand.
- Hold the item to be enchanted, in main hand.
- Type
/nu enchantinfo
to see available enchantments (names and max allowed level), result possibilities and cool down status. This step is optional. - To enchant
DAMAGE_ALL
level 5 to item in main hand, type/nu enchant DAMAGE_ALL 5
.