Another 1.13.2 fix

This commit is contained in:
nossr50 2020-08-18 20:28:09 -07:00
parent e5f1738168
commit 7ea9ec5c2f
2 changed files with 4 additions and 11 deletions

View File

@ -1,11 +1,9 @@
package com.gmail.nossr50.util.compat.layers.persistentdata;
import com.gmail.nossr50.datatypes.meta.SuperAbilityToolMeta;
import com.gmail.nossr50.datatypes.meta.UUIDMeta;
import com.gmail.nossr50.mcMMO;
import org.bukkit.block.Furnace;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Item;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.tags.CustomItemTagContainer;
@ -53,10 +51,6 @@ public class SpigotTemporaryDataLayer extends AbstractPersistentDataLayer {
@Override
public void setSuperAbilityBoostedItem(@NotNull ItemStack itemStack, int originalDigSpeed) {
Metadatable metadatable = getMetadatable(itemStack);
metadatable.setMetadata(ABILITY_TOOL_METADATA_KEY, new SuperAbilityToolMeta(originalDigSpeed, mcMMO.p));
ItemMeta itemMeta = itemStack.getItemMeta();
if(itemMeta == null) {
@ -68,10 +62,6 @@ public class SpigotTemporaryDataLayer extends AbstractPersistentDataLayer {
itemStack.setItemMeta(itemMeta);
}
private Metadatable getMetadatable(@NotNull ItemStack itemStack) {
return (Metadatable) itemStack;
}
@Override
public boolean isSuperAbilityBoosted(@NotNull ItemStack itemStack) {
ItemMeta itemMeta = itemStack.getItemMeta();

View File

@ -23,7 +23,10 @@ import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.*;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.inventory.ShapelessRecipe;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.jetbrains.annotations.NotNull;