Some bugfixes to the new ability tool tracking

This commit is contained in:
nossr50
2020-08-18 19:47:15 -07:00
parent a7ded7e982
commit 557cfe3944
7 changed files with 44 additions and 26 deletions

View File

@@ -523,6 +523,11 @@ public final class ItemUtils {
public static void addDigSpeedToItem(ItemStack itemStack, int existingEnchantLevel) {
ItemMeta itemMeta = itemStack.getItemMeta();
if(itemMeta == null)
return;
itemMeta.addEnchant(Enchantment.DIG_SPEED, existingEnchantLevel + AdvancedConfig.getInstance().getEnchantBuff(), true);
itemStack.setItemMeta(itemMeta);
}
}