Custom Durability

Jan 30, 2019
Custom Durability


  • Custom durability is a really powerful system that allows you to create items with a set amount of uses unlike the vanilla durability system which forces you to always have the same amount of uses for a type of item, unless you use the Unbreaking enchant which may just look unclean.
    All items can have a Max Durability stat, which defines how many times the item can be used before either breaking or becoming unusable. The Will Break item option defines whether or not the item will break when it is finally out of uses.

    Since that durability system is not based on the vanilla MC durability system, it allows you to create both items with different amount of uses and items with custom textures which are not unbreakable.
    If you make your item unbreakable using the corresponding item option, the custom durability system will still work - the Unbreakable item option only impacts the vanilla durability system.

    The items do not directly display how many uses they have left. You have two ways of knowing how damaged your item is. Either by checking the item lore which will display the item durability state, or by using PlaceholderAPI to get the item's durability as a durability 'progress bar' as a simpler numeric value.

    • Via Placeholders
      • %mmoitems_durability% returns the amount of uses left of the item the player is holding.
      • %mmoitems_durability_max% returns the item max durability.
        papi parse @p &7Current Durability: &6&l%mmoitems_durability%&7/&6&l%mmoitems_durability_max%

        [​IMG]
      • %mmoitems_durability_ratio% returns the item's durability ratio (from 0% to 100%).[​IMG]
      • %mmoitems_durability_bar_square% returns the item durability as a progress bar.[​IMG]
      • %mmoitems_durability_bar_diamond% returns the durability bar, but the char used is a diamond.[​IMG]
      • %mmoitems_durability_bar_thin% returns a much thiner durability bar.[​IMG]

    • Via Durability States
    Durability states are used to display an item durabilitty in its lore. As the item gets more and more damaged, the durability state displayed in the item lore will change, indicating a lower state.
    The item is not used at all.

    [​IMG]

    The item gets slightly used...

    [​IMG]

    And will eventually break if not repaired.

    Durability states can be edited in the use-states.yml config file. You can edit their 'use ratios' and their 'lore tag'. e.g
    Code (Text):
    NOT_VERY_USED:
        use-ratio:
            max: 90
            min: 80
        lore-tag: '&eNot Very Used'
    This means that any item which still has between 80% and 90% of its durability (so any item which has lost 10% to 20% of its uses) will be in that durability state. Moreover, the item will display Not Very Used in its lore.
  • Loading...
  • Loading...