1.13.2 fix round 3.. or 4

This commit is contained in:
nossr50
2020-08-18 20:38:56 -07:00
parent 7ea9ec5c2f
commit 1feee7f312
3 changed files with 19 additions and 8 deletions

View File

@ -30,6 +30,7 @@ import org.bukkit.inventory.ShapelessRecipe;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Iterator;
@ -135,6 +136,9 @@ public class SkillUtils {
if (HiddenConfig.getInstance().useEnchantmentBuffs()) {
ItemStack heldItem = player.getInventory().getItemInMainHand();
if(heldItem == null)
return;
if (!ItemUtils.canBeSuperAbilityDigBoosted(heldItem)) {
return;
}
@ -200,7 +204,10 @@ public class SkillUtils {
}
}
public static void removeAbilityBuff(@NotNull ItemStack itemStack) {
public static void removeAbilityBuff(@Nullable ItemStack itemStack) {
if(itemStack == null)
return;
if(!ItemUtils.canBeSuperAbilityDigBoosted(itemStack))
return;