Skip to content

materials.yml

Miden edited this page Oct 5, 2026 · 6 revisions

Here is a full guide on how to use the materials.yml file to add your own Enchant "recipes." By default, the plugin comes with a filled-out version of the file that contains a recipe for every enchant in the game, but this page will assume that your file is empty.

Formatting

Lets start by looking at an example of one such recipe, this one sets the material QUARTZ to correspond with the Sharpness enchant:

QUARTZ:
  sharpness:

We start by making a configuration section with the name of the material we intend to use, in this case, QUARTZ. Then, below that, we specify a new configuration section with the enchant we want to use when trying to enchant with quartz, in this case sharpness.

QUARTZ can be either uppercase or lowercase, it does not matter, but the enchantment should always be lowercase.

Inside the section we made for the enchantment, we are then going to make new sections for every level the enchant can be. Sharpness has a max level of 5, so we will make a section for each level 1-5 like so:

QUARTZ:
  sharpness:
    1:
    2:
    3:
    4:
    5:

Once these sections for each level is created, we're then going to set a cost in levels and a cost in the amount of the specified material for each level.

QUARTZ:
  sharpness:
    1:
      level-cost: 4
      material-cost: 8
    2:
      level-cost: 6
      material-cost: 8
    3:
      level-cost: 6
      material-cost: 12
    4:
      level-cost: 8
      material-cost: 12
    5:
      level-cost: 8
      material-cost: 20

With that, your job is done! Now, when you go in-game and try to enchant something with quartz in the new enchanting gui, it will apply the sharpness enchant and consume the amount of exp and materials that you specified here.

Multiple enchants for one material

In some cases, you may want to have one material correspond to multiple different enchants. For example, it just makes sense that the Power on bows and Sharpness on swords come from the same material since both do practically the same thing. To accomplish this, all we're going to do is add a second configuration section for the power enchant inside the section for QUARTZ, like so:

QUARTZ:
  sharpness:
    1:
      level-cost: 4
      material-cost: 8
    2:
      level-cost: 6
      material-cost: 8
    3:
      level-cost: 6
      material-cost: 12
    4:
      level-cost: 8
      material-cost: 12
    5:
      level-cost: 8
      material-cost: 20
  power:

And we're going to fill it in just like we did with sharpness:

QUARTZ:
  sharpness:
    1:
      level-cost: 4
      material-cost: 8
    2:
      level-cost: 6
      material-cost: 8
    3:
      level-cost: 6
      material-cost: 12
    4:
      level-cost: 8
      material-cost: 12
    5:
      level-cost: 8
      material-cost: 20
  power:
    1:
      level-cost: 4
      material-cost: 8
    2:
      level-cost: 6
      material-cost: 8
    3:
      level-cost: 6
      material-cost: 12
    4:
      level-cost: 8
      material-cost: 12
    5:
      level-cost: 8
      material-cost: 20

Now, if you have quartz in your enchanting table, putting a sword in the tool slot will enchant it with sharpness, and putting a bow in the tool slot will enchant it with power!

It's important to make sure that you do not try and put two enchantments that apply to the same tools under the same material, as this will cause the plugin to not function properly. For example, you cannot put Mending and Unbreaking both under the same material as they both apply to the same tools. Another harder to notice example would be Sharpness and Efficiency. These should be on separate materials since both can be applied to axes, and having them as the same material will confuse the plugin when trying to enchant an Axe.

Custom Materials

I mentioned before that you can use custom items from your other plugins as custom enchanting materials. As of right now, this functionality is limited to ItemsAdder and CraftEngine. However, in the future, I intend to support more than just these two plugins, but support for plugins other than ItemsAdder and CraftEngine are low on my priority list.

ItemsAdder

To add a custom item from ItemsAdder as your enchanting material, you simply replace the vanilla material with your items ID (WITHOUT the namespace!) like so:

ruby:
  sharpness:
    1:
      level-cost: 4
      material-cost: 8
    2:
      level-cost: 6
      material-cost: 8
    3:
      level-cost: 6
      material-cost: 12
    4:
      level-cost: 8
      material-cost: 12
    5:
      level-cost: 8
      material-cost: 20

Here, it is important to make sure that the material's ID is lowercase. Next, you're going to create a new configuration section underneath the material ID called custom-material that looks like this:

ruby:
  custom-material:
    source: "itemsadder"
    namespace: "tbmcia"
  sharpness:
    1:
      level-cost: 4
      material-cost: 8
    2:
      level-cost: 6
      material-cost: 8
    3:
      level-cost: 6
      material-cost: 12
    4:
      level-cost: 8
      material-cost: 12
    5:
      level-cost: 8
      material-cost: 20

The "source" field is to specify which plugin the item is coming from, in this case ItemsAdder, and the namespace is the namespace you used when creating the item in ItemsAdder itself. After this step, you're done! Restart your server to apply the changes and you will now be able to use your custom ItemsAdder material as a custom enchanting material.

CraftEngine

Adding a custom item from CraftEngine as a material follows the exact same format as ItemsAdder above, but you will replace the source with CraftEngine like so:

topaz:
  custom-material:
    source: "craftengine"
    namespace: "default"
  sharpness:
    1:
      level-cost: 4
      material-cost: 8
    2:
      level-cost: 6
      material-cost: 8
    3:
      level-cost: 6
      material-cost: 12
    4:
      level-cost: 8
      material-cost: 12
    5:
      level-cost: 8
      material-cost: 20

Custom Enchanting Requirements

Some server may want to impose other requirements before the player is allowed to enchant an item, such as in an RPG server where a player has to increase their enchanting skill. Perhaps a player has to be a certain enchanting level before they are allowed to apply Sharpness 5 on their own weapons.

Nouveau Enchanting supports several plugins that allow you to add custom requirements to enchants:

SeverLevels

(Introduced version NouveauEnchanting v1.0.1+)

Using ServerLevels, you can require the player to be a certain minimum level in a specific level system before they are allowed to apply the enchant. The level requirement will appear on the cost preview item, and if the player's level is too low a message will be sent to the player (You can also customize the message you want sent!) Here is an example using sharpness:

QUARTZ:
  sharpness:
    1:
      level-cost: 4
      material-cost: 8
      sl-requirements:
        system-name: enchanting
        level: 1
        low-level-msg: "<red>Your enchanting level is too low! Current level: %level%, Required level: 1</red>"
    2:
      level-cost: 6
      material-cost: 8
      sl-requirements:
        system-name: enchanting
        level: 2
    3:
      level-cost: 6
      material-cost: 12
      sl-requirements:
        system-name: enchanting
        level: 3
    4:
      level-cost: 8
      material-cost: 12
      sl-requirements:
        system-name: enchanting
        level: 4
    5:
      level-cost: 8
      material-cost: 20
      sl-requirements:
        system-name: enchanting
        level: 5

First, we have to add the sl-requirements field, and inside it add the system-name option. system-name should be set to the name of the system you want to check the level for exactly as written in your ServerLevels levelsystems.yml. Then, add the level option and set it it to the minimum required level to be able to apply the enchant.

At this point, your system is set up and will work just fine. However, if you want to customize the message sent to the player when their level is too low, we have to add the low-level-msg option. In this message, "%level%" will be replaced by the player's current level. Like all messages in the plugin, this message also uses the MiniMessage format for color and formatting.

In the above configuration, each level of sharpness requires 1 level in the enchanting system. So sharpness level 1 requires enchanting level 1, sharpness level 2 requires enchanting level 2, and so on.

Clone this wiki locally