fix: replace deprecated usage of Core's NBTItem class with item-nbt-api

This commit is contained in:
Christian Koop 2024-06-22 15:27:46 +02:00
parent 5b5e554af8
commit 0094106b43
No known key found for this signature in database
GPG Key ID: 6A4A09E8ED946113

View File

@ -1,7 +1,6 @@
package com.craftaro.epichoppers.hopper.levels;
import com.craftaro.core.nms.Nms;
import com.craftaro.core.nms.nbt.NBTCore;
import com.craftaro.core.third_party.de.tr7zw.nbtapi.NBT;
import com.craftaro.core.third_party.de.tr7zw.nbtapi.NBTItem;
import com.craftaro.epichoppers.hopper.levels.modules.Module;
import org.bukkit.ChatColor;
@ -45,9 +44,7 @@ public class LevelManagerImpl implements LevelManager {
@Override
public boolean isEpicHopper(ItemStack item) {
NBTCore nbt = Nms.getImplementations().getNbt();
if (nbt.of(item).has("level")) {
if (NBT.readNbt(item).hasTag("level")) {
return true;
}