Sueta

YourDurabilitY

1.0.1

Make custom durability for items and display it on lore.

·Plugin

This plugin allows you to use a lore line of the items with vanilla durability (swords, bows, armor, fishing rod, elytra, etc) to define and use a custom durability capable of:

  • Reduce durability like vanilla (PlayerItemDamageEvent)
  • Add durability with custom repair items
  • Add durability with the repair enchantment
  • Display durability bar for custom durability

You can start with the /ydy command and look to the config files.

config.yml
first-lore-line: true
# If false, the plugin will use the last lore line
vanilla-anvil-uses: false
# If true, the plugin will work with the vanilla anvil cost system.
# Increase the level cost as the item is used on anvil.
preffix-format: "&fDurability:"
# MUST NOT have spaces.
# This text will be check for durability changes and the '/ydy' command.
color-durability: "&e"
# Applies after the preffix-format to define de numbers color.
Messages:
    preffix-plugin: "&6[&9YourDurabilitY&6]"
    missing-args: "&cMissing args."
    invalid-args: "&cInvalid args."
    invalid-number: "&cInvalid number."
    invalid-item: "&cInvalid item."
    invalid-repair: "&cInvalid repair item."
    no-item: "&cThere is not item in main hand."
    no-repair: "&cThis item doesn't have repair items."
    no-ydy: "&cItem not contains custom durability."
    unsupported-durability: "&cThis item doesn't support durability."
    main-usage: "&eUsage: /ydy [ get | reload | set | version ]"
    version: "&eCurrent version:"
    reload: "&aConfigs reloaded."
    set-usage: "&eUsage: /ydy set [num1]/[num2] <RepairItems>"
    set-success: "&aDone!"
    get-usage: "&eUsage: /ydy get [ repair | item ]"
    get-repair-success: "&6RepairItems:"
    get-item-usage: "&eUsage: /ydy get item [RepairItem] <Amount>"
    get-item-success: "&aRecieved:"
    remove-usage: "&eUsage: /ydy remove [ durability | line | repair ]"
    remove-repair-success: "&aRepair items removed."
    remove-durability-success: "&aCustom durability removed."
    remove-line-usage: "&eUsage: /ydy remove line [number from 1]"
    remove-line-success: "&aDone! Line removed:"
Inventory:
    vanilla-name: "&cYou can not do that!"
    vanilla-lore:
        - "&fTo repair a custom durability item"
        - "&fyou must &eright click on the anvil"
        - "&ewith the item to be repaired&f in"
        - "&fthe main hand."
    inventory-name: "&1Repair your item here! &6:D"
    repair-info-name: "&e[Click to see its repair items]"
    repair-info-lore:
        - "&eInstructions:"
        - "&7- &fYou can only modify the material slot."
        - "&7- &fThe white panel displays the level cost."
        - "&7- &fClose this inventory to get your items."
    repair-cost-name: "&fTotal level cost:"
    repair-error-name: "Invalid item!"
    materials-info-name: "&e[Click to go reparation menu]"
    materials-info-lore:
        - "&eInstructions:"
        - "&7- &fOnly repair items for the current"
        - "  &fitem are displayed."
        - "&7- &fPlace the cursor on to see the cost"
        - "  &fand repair amount."
    materials-lore-cost: "&eCost:&f"
    materials-lore-amount: "&eAmount:&f"
repairitems.yml
ExemplaryIngot:
    Material: IRON_INGOT
# Material IDs: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
    CustomName: "Exemplary ingot"
# The item custom name to check. Leave empty ("") to skip.
    Percentage: false
# Percent amount (true) or only flat amount (false).
    Amount: 150
# Durability amount to repair.
    Cost: 1
# Repair level cost. At least 1.
Sunflower:
    Material: SUNFLOWER
    CustomName: ""
    Percentage: false
    Amount: 6
    Cost: 1
RunicLeather:
    Material: leather
    CustomName: "&dRunic leather"
    Percentage: true
    Amount: 20
    Cost: 3

*Description WIP*

Similar projects

Plugin →