From 61644a1b1fa7fd9c4e3f513f72fec8a82bde0935 Mon Sep 17 00:00:00 2001 From: Ethan Date: Mon, 29 Mar 2021 01:04:43 -0400 Subject: [PATCH] !DURABILITY BAR --- src/main/java/net/Indyuce/mmoitems/ItemStats.java | 2 ++ .../java/net/Indyuce/mmoitems/stat/DurabilityBar.java | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/main/java/net/Indyuce/mmoitems/stat/DurabilityBar.java diff --git a/src/main/java/net/Indyuce/mmoitems/ItemStats.java b/src/main/java/net/Indyuce/mmoitems/ItemStats.java index 336385d0..7c662e06 100644 --- a/src/main/java/net/Indyuce/mmoitems/ItemStats.java +++ b/src/main/java/net/Indyuce/mmoitems/ItemStats.java @@ -21,6 +21,7 @@ import net.Indyuce.mmoitems.stat.CustomSounds; import net.Indyuce.mmoitems.stat.DisableAdvancedEnchantments; import net.Indyuce.mmoitems.stat.DisableDeathDrop; import net.Indyuce.mmoitems.stat.DisplayName; +import net.Indyuce.mmoitems.stat.DurabilityBar; import net.Indyuce.mmoitems.stat.DyeColor; import net.Indyuce.mmoitems.stat.Effects; import net.Indyuce.mmoitems.stat.Elements; @@ -100,6 +101,7 @@ public class ItemStats { DURABILITY = new ItemDamage(), CUSTOM_MODEL_DATA = new CustomModelData(), MAX_DURABILITY = new MaximumDurability(), + DURABILITY_BAR = new DurabilityBar(), WILL_BREAK = new LostWhenBroken(), NAME = new DisplayName(), LORE = new Lore(), diff --git a/src/main/java/net/Indyuce/mmoitems/stat/DurabilityBar.java b/src/main/java/net/Indyuce/mmoitems/stat/DurabilityBar.java new file mode 100644 index 00000000..1a79fc24 --- /dev/null +++ b/src/main/java/net/Indyuce/mmoitems/stat/DurabilityBar.java @@ -0,0 +1,11 @@ +package net.Indyuce.mmoitems.stat; + +import net.Indyuce.mmoitems.stat.type.BooleanStat; +import org.bukkit.Material; + +public class DurabilityBar extends BooleanStat { + public DurabilityBar() { + super("DURABILITY_BAR", Material.DAMAGED_ANVIL, "Show Durability Bar", + new String[] { "Enable this to have the green bar", "show when using custom durability." }, new String[] { "!block", "all"}); + } +}