Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
M mmoitems
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 47
    • Issues 47
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Administrator
  • mmoitems
  • Wiki
  • Custom Durability

Custom Durability · Changes

Page history
Updated Custom Durability (markdown) authored Feb 22, 2020 by Indyuce's avatar Indyuce
Hide whitespace changes
Inline Side-by-side
Showing with 4 additions and 22 deletions
+4 -22
  • Custom-Durability.md Custom-Durability.md +4 -22
  • No files found.
Custom-Durability.md
View page @ 4cd5e825
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.\ 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. 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 _Lost when Broken_ item option defines whether or not the item will be lost when it reaches 0 durability.
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. Durability is displayed on the item vanilla durability bar, however you may also display the player's held item durability using PAPI placeholders. Items can be repaired at the anvil or using repairing consumables.
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. ## Durability Placeholders
## Via Placeholders
* **%mmoitems_durability%** returns the amount of uses left of the item the player is holding. * **%mmoitems_durability%** returns the amount of uses left of the item the player is holding.
* **%mmoitems_durability_max%** returns the item max durability.\ * **%mmoitems_durability_max%** returns the item max durability.\
![](https://i.imgur.com/TaumARR.png) ![](https://i.imgur.com/TaumARR.png)
...@@ -17,19 +14,4 @@ The items do not directly display how many uses they have left. You have two way ...@@ -17,19 +14,4 @@ The items do not directly display how many uses they have left. You have two way
* **%mmoitems_durability_bar_diamond%** returns the durability bar, but the char used is a diamond.\ * **%mmoitems_durability_bar_diamond%** returns the durability bar, but the char used is a diamond.\
![](https://i.imgur.com/QPrLKtj.png) ![](https://i.imgur.com/QPrLKtj.png)
* **%mmoitems_durability_bar_thin%** returns a much thiner durability bar.\ * **%mmoitems_durability_bar_thin%** returns a much thiner durability bar.\
![](https://i.imgur.com/MJvhd6S.png) ![](https://i.imgur.com/MJvhd6S.png)
\ No newline at end of file
## 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.\
![](https://i.imgur.com/En61zjP.png)
![](https://i.imgur.com/8DbooXv.png)
Durability states can be edited in the use-states.yml config file. You can edit their 'use ratios' and their 'lore tag'. e.g
```
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.
\ No newline at end of file
Clone repository

  • Home
  • Installation Guide

General

  • Item Types
  • Item Stats & Options
  • Item Creation

Features

  • Mitigation
  • Elemental Damage
  • Item Identification
  • Item Tiers
  • Gem Stones
  • Custom Durability
  • Item Sets
  • Item Upgrading
  • Soulbound

Crafting Stations

  • Crafting Stations
  • Upgrading Recipes
  • Recipe Conditions
  • Recipe Ingredients
  • Recipe Triggers

Item Management

  • Item Updater
  • Item Drop Tables

Abilities

  • Abilities
  • Ability List

Compatibility & API

  • Supported Plugins
  • Custom Item Textures
  • Plugin API