📕Enchantments

On this page you will learn how to make an enchantment for the Miner.

First, you need to open the enchants.yml file, in the plugin folder. Default enchantments will appear.

You have to add the section with the name (It is very important that you remember the name, since it will be useful later) of the enchantment you want to create, for example we are going to create the Fortune enchantment.

# NEW ENCHANTMENT
  fortune:
    MaxLevel: 100
    MaxChance: 5
    Cost: 1500
    Currency: edp-tokens
    Message: 'The enchantment of fortune has given you money.'
    Commands:
      - 'money give %advancedminer_player% %advancedminer_randomint_1000|10000%'

Now that we have the enchantment, you must save the file, and go to the guis.yml file. And add the section for the enchantment we just created.

# BELOW THE menu-enchantments SECTION: 
      fortune-enchant:
        Name: "&e&lFortune &3&lEnchant"
        Material: DIAMOND_PICKAXE
        Lore:
          - "&7&oIncreases the amount of money the npc gets when mining"
          - "&3"
          - "&7&oType: &eTokens"
          - "&3"
          - "&fInformation:"
          - "&7&oChance: &e%chance%"
          - "&7&oPrice: &e%cost_formatted%"
          - "&7&oLevel: &f%level%&7/&f%max_level%"
          - ''
          - '&fLeft-Click to enchant 1 level'
        Slot: 12
        Enchant: fortune
triangle-exclamation

And that's it, if everything is fine a message like this should have appeared in the server console:

And the enchantment will now be ready to be used within the game.

Last updated