diff --git a/UltimateTimber-Adapter/Current/src/main/java/com.songoda.ultimatetimber.adapter.current/CurrentAdapter.java b/UltimateTimber-Adapter/Current/src/main/java/com.songoda.ultimatetimber.adapter.current/CurrentAdapter.java index e6c7537..b8859fb 100644 --- a/UltimateTimber-Adapter/Current/src/main/java/com.songoda.ultimatetimber.adapter.current/CurrentAdapter.java +++ b/UltimateTimber-Adapter/Current/src/main/java/com.songoda.ultimatetimber.adapter.current/CurrentAdapter.java @@ -60,7 +60,7 @@ public class CurrentAdapter implements VersionAdapter { @Override public void applyToolDurability(Player player, int damage) { ItemStack tool = this.getItemInHand(player); - if (tool.getType().getMaxDurability() < 1) + if (tool.getType().getMaxDurability() < 1 || (tool.getItemMeta() != null && tool.getItemMeta().isUnbreakable())) return; int unbreakingLevel = tool.getEnchantmentLevel(Enchantment.DURABILITY); diff --git a/UltimateTimber-Adapter/Legacy/src/main/java/com.songoda.ultimatetimber.adapter.legacy/LegacyAdapter.java b/UltimateTimber-Adapter/Legacy/src/main/java/com.songoda.ultimatetimber.adapter.legacy/LegacyAdapter.java index 7213d4c..b9e3739 100644 --- a/UltimateTimber-Adapter/Legacy/src/main/java/com.songoda.ultimatetimber.adapter.legacy/LegacyAdapter.java +++ b/UltimateTimber-Adapter/Legacy/src/main/java/com.songoda.ultimatetimber.adapter.legacy/LegacyAdapter.java @@ -106,7 +106,7 @@ public class LegacyAdapter implements VersionAdapter { @Override public void applyToolDurability(Player player, int damage) { ItemStack tool = this.getItemInHand(player); - if (tool.getType().getMaxDurability() < 1) + if (tool.getType().getMaxDurability() < 1 || (NMSUtil.getVersionNumber() > 8 && tool.getItemMeta() != null && tool.getItemMeta().isUnbreakable())) return; int unbreakingLevel = tool.getEnchantmentLevel(Enchantment.DURABILITY); diff --git a/UltimateTimber/Plugin/src/main/resources/config-legacy.yml b/UltimateTimber/Plugin/src/main/resources/config-legacy.yml index 43b2352..01b168d 100644 --- a/UltimateTimber/Plugin/src/main/resources/config-legacy.yml +++ b/UltimateTimber/Plugin/src/main/resources/config-legacy.yml @@ -212,7 +212,7 @@ trees: - LEAVES:1,5,9,13 sapling: SAPLING:1 plantable-soil: [] - max-log-distance-from-trunk: 1 + max-log-distance-from-trunk: 2 max-leaf-distance-from-log: 6 search-for-leaves-diagonally: false drop-original-log: true