mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Another 1.13.2 fix
This commit is contained in:
parent
e5f1738168
commit
7ea9ec5c2f
@ -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();
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user