Create your enchantments
This page will help you create your own enchantments.
First step - Create the enchant file
Create a file called <enchant_name>.yml
into the ./plugins/Nebula/enchants/
folder.
Second step - Edit the properties
Enchantment name
This is the name of the enchantment, it must be lowercase and not contain any space. This will be the name you'll use to find it in game.
enchantment_name: abyss
Displayed name
This is the name that will be displayed on the items, you can use the group color (see Groups) using %group_color%
or your own color with Vanilla color code.
displayed_name: "%group_color%Abyss"
Description
The description will be shown on the Enchant Book corresponding to this enchant. You can use %level%
as a placeholder to replace the book level, you can also compute a formula using the compute formula (the level placeholder can be included in the formula : compute_{%level%*2}
. More infos about descriptions can be found here : Description
description: "&fIncrease damages by &ccompute_{%level%*2}%"
Maximum enchant level
This is the maximum enchant level that won't be able to be exceeded either by the enchant book or on the item.
level_max: 5
Group
This is the enchant group, by defining an enchant as a part of a group, it will gain all of its properties. The group has to be defined. (see Groups)
group: superior
Items type
The items type define the items that can receive this enchantment, you can write here multiple items, and/or group of items. Items can be found here, and the groups are :
all : can be applied to every item (weapons, tools, armor, shield)
weapons : all axes, swords and trident
distance_weapons : bow, crossbow, trident
tools : all pickaxes, shovels, hoes, axes, fishing rod and shears
swords : all swords
axes : all axes
armor : all boots, chestplates, helmets, leggings
boots : all boots
shovels : all shovels
pickaxes : all pickaxes
helmets : all helmets
leggings : all leggings
chestplates : all chestplates
hoes : all hoes
mana_holders : all weapons, distance_weapons and tools
items_type: bow, crossbow
Conflicts enchants
If the name specified in Enchantment name of another enchant is specified here, players won't be able to apply this enchant that contains one of these enchants.
conflicts_enchants:
- "enchant1"
- "enchant2
Trigger
The trigger is the way the enchant will be triggered (see how triggers work here Triggers).
trigger: distance_hit<all>
Mana required
This will define how many mana is necessary to execute the effect. If the amount is more than 0, the item will need a mana bar on it and the current mana amount on the item superior to the necessary amount (see Mana).
mana_required: 30-%level%*5
Chance
This defines the chance for the effect to be applied. A chance of 0
mean that the effect will never be applied and 100
will be applied all the time (more infos on Chances).
chance : %level%*2
Conditions to enchant
Conditions to enchants are conditions that have to be met to apply an enchant book. Here is an example of how to avoid a player to enchant an item except in the world called my_world :
conditions_enchanting:
- "%player_world%[IS]my_world"
Conditions to activate
Conditions to activate have the same format as Conditons to enchant. They must be all verified before effects activation (to learn how to create conditions, see Conditions).
conditions_activation:
- "@player_item_in_hand@[IS]BOW"
Effects
Effects are activated if conditions are met (to learn how to create effects, see Effects).
effects:
- "level[all]:ennemy[damage_add_%level%*0.25]"
Items found in chests
You can prevent this enchant book from spawning in chests (see how chest spawning works here Chest spawning).
chest_found: true
Items sold by villagers
You can prevent this enchant book from being sold by villagers (see Villagers).
villager_foundable: true
Enchant found on enchant table
Enable or disable this enchant on enchant tables (see Enchant Tables).
enchanting_table_foundable: true
Possibility to fish
You can prevent this enchant book from being found by fishing with special rod (see Fishing).
possible_to_fish: true
Emerald price
This is the price the enchant book can be bought on villagers (you can include %level% placeholder).
emerald_price: "10*%level%"
Permission
If this is enabled, the player will need a permission to use the enchant (effects won't be activated if the player doesn't have the permission).
permission_needed: false
Placeholders from PlaceholdersAPI can be used everywhere in the enchant config (description, effects, conditions, chance, mana)
Last updated