Mastery

The Mastery system allows players to improve custom weapons through forging. Each forge level can increase the weapon's durability, change its display information etc

Forging a Weapon

To forge a weapon:

  1. Hold the custom weapon in your main hand.
  2. Make sure you have the required materials in your inventory.
  3. Use the plugin's forge command or forging menu.
  4. The required materials will be removed from your inventory.
  5. The weapon will advance to the next forge level.

Forging also fully repairs the weapon and updates its lore. A weapon cannot be upgraded past its configured maximum forge level.

Global Forgery Settings

Add the following settings to the weapon file:

forgery:
  enabled: true
  default-max-level: 5
  default-cost-material: IRON_INGOT
  default-cost-base-amount: 8
  default-cost-growth: 4

repair:
  default-cost-material: IRON_INGOT
  default-cost-amount: 4
Setting Description
forgery.enabled Enables or disables forging for the whole server.
default-max-level The default maximum forge level.
default-cost-material The default Minecraft material required for forging.
default-cost-base-amount The material cost for the first forge level.
default-cost-growth The amount added to the cost after each forge level.
repair.default-cost-material The default material used to repair custom weapons.
repair.default-cost-amount The default number of repair materials required.

 

How the Default Cost Is Calculated

The default forge cost uses this formula:

cost = base amount + current level × growth

Per-Level Settings

Each forge level can have its own cost, display name, money reward, and console commands.

forgery:
  enabled: true
  max-level: 3

  levels:
    1:
      display-name: "&eReinforced"
      cost-material: IRON_INGOT
      cost-amount: 8
      vault-money: 100.0
      commands:
        - "give %player% experience_bottle 4"

    2:
      display-name: "&6Tempered"
      cost-material: GOLD_INGOT
      cost-amount: 12
      vault-money: 250.0
      commands:
        - "xp add %player% 10 levels"

    3:
      display-name: "&cMaster Forged"
      cost-material: DIAMOND
      cost-amount: 4
      vault-money: 500.0
      commands:
        - "broadcast %player% upgraded %weapon% to forge level %level%"
Setting Description
display-name The name shown when the player reaches this forge level.
cost-material The Minecraft material required for this level.
cost-amount The exact number of materials required for this level.
vault-money The amount of money given to the player after the upgrade.
commands Console commands that run after the player completes the upgrade.

Command Placeholders

The following placeholders can be used inside forge reward commands:

Placeholder Description
%player% The player's Minecraft name.
%weapon% The custom weapon's display name without colour codes.
%level% The new forge level.

Using Vault

Setup

  1. Download and install Vault.
  2. Install a Vault-compatible economy plugin.
  3. Place both plugin files in the server's plugins folder.
  4. Restart the server.

Giving Money After Forging

Add vault-money under a forge level:

forgery:
  levels:
    1:
      vault-money: 100.0

After the player upgrades the weapon to level 1, the plugin deposits 100.0 into the player's economy account.

If Vault is missing, disabled, or not connected to an economy plugin, the weapon can still be forged, but the money reward will not be given.

Repairing Weapons

Custom weapons with durability can be repaired by holding the weapon in the main hand and using the plugin's repair command or repair menu.

repair:
  cost-material: IRON_INGOT
  cost-amount: 4

When repaired:

  • The required materials are removed.
  • The weapon returns to its maximum durability.
  • The weapon's visible damage is reset.
  • The weapon lore is updated.

A weapon that is already fully repaired will not consume any materials.

Complete Example

forgery:
  enabled: true
  max-level: 3
  cost-material: IRON_INGOT
  cost-base-amount: 8
  cost-growth: 4

  levels:
    1:
      display-name: "&eReinforced"
      cost-material: IRON_INGOT
      cost-amount: 8
      vault-money: 100.0
      commands:
        - "give %player% experience_bottle 4"

    2:
      display-name: "&6Tempered"
      cost-material: GOLD_INGOT
      cost-amount: 12
      vault-money: 250.0
      commands:
        - "xp add %player% 10 levels"

    3:
      display-name: "&cMaster Forged"
      cost-material: DIAMOND
      cost-amount: 4
      vault-money: 500.0
      commands:
        - "broadcast %player% has mastered %weapon%!"

repair:
  cost-material: IRON_INGOT
  cost-amount: 4
Advertisement
Advertisement