From b19547957941472eb52ceba242de03f350724629 Mon Sep 17 00:00:00 2001 From: Lightling Date: Tue, 17 Sep 2019 16:21:54 -0400 Subject: [PATCH] began work on fixing unbreaking issue --- plugin/plugin.yml | 2 +- .../lightling/gibsoniacraft/util/BlockListener.java | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/plugin/plugin.yml b/plugin/plugin.yml index e27496b..79bcab7 100644 --- a/plugin/plugin.yml +++ b/plugin/plugin.yml @@ -1,6 +1,6 @@ main: lightling.gibsoniacraft.GibsoniaCraft name: GibsoniaCraft -version: 1.1.2 +version: 1.1.3 author: Lightling description: Adds some small additions/changes to a PaperMC server api-version: 1.14 \ No newline at end of file diff --git a/plugin/src/lightling/gibsoniacraft/util/BlockListener.java b/plugin/src/lightling/gibsoniacraft/util/BlockListener.java index 22d3a84..1c8d389 100644 --- a/plugin/src/lightling/gibsoniacraft/util/BlockListener.java +++ b/plugin/src/lightling/gibsoniacraft/util/BlockListener.java @@ -123,6 +123,11 @@ public class BlockListener implements Listener } } + else if (item.getEnchantments().containsKey(Enchantment.DURABILITY)) + { + addToDamage = 0; + } + // Update durability dMeta.setDamage(currDur + addToDamage); item.setItemMeta(meta); @@ -200,6 +205,11 @@ public class BlockListener implements Listener } } + else if (item.getEnchantments().containsKey(Enchantment.DURABILITY)) + { + addToDamage = 0; + } + // Update durability dMeta.setDamage(currDur + addToDamage); item.setItemMeta(meta);