mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-04 05:25:28 +02:00
Some bugfixes to the new ability tool tracking
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user