Repair Spell - TheComputerGeek2/MagicSpells GitHub Wiki

Source Code

spell-class: ".instant.RepairSpell"

Description:

Instant Spell that repairs durability on items and armor.

Configuration:

Since 4.0 Beta 13 some of these options support dynamic values through numeric or string expressions.

Option Description Type Default Supports expressions
repair-amount How much to repair. Integer 300 true
resolve-repair-amount-per-item Since 4.0 Beta 13. Defines expression evaluation behaviour. Boolean false true
to-repair A list of inventory slots to repair. Valid values: held, mainhand, offhand, hotbar, inventory, helmet, chestplate, leggings, or boots. String List false
ignore-items A list of item types to ignore. String List false
allowed-items A list of item types to repair. String List false
str-nothing-to-repair The message that appears when there is nothing to repair. Rich Text "Nothing to repair." true

Example:

repair:
    spell-class: ".instant.RepairSpell"
    cast-item: book
    cooldown: 120
    repair-amount: 300
    to-repair:
        - held
        - hotbar
        - inventory
        - helmet
        - chestplate
        - leggings
        - boots
    ignore-items:
        - flint_and_steel
        - fishing_rod
    cost:
        - mana 50
        - iron_ingot 2
    str-cost: 50 mana and 2 iron bars
    str-cast-self: You've repaired your gear!
    str-nothing-to-repair: You have nothing to repair.