mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-11-22 10:15:43 +01:00
fix: replace deprecated usage of Core's NBTItem class with item-nbt-api
This commit is contained in:
parent
5b5e554af8
commit
0094106b43
@ -1,7 +1,6 @@
|
|||||||
package com.craftaro.epichoppers.hopper.levels;
|
package com.craftaro.epichoppers.hopper.levels;
|
||||||
|
|
||||||
import com.craftaro.core.nms.Nms;
|
import com.craftaro.core.third_party.de.tr7zw.nbtapi.NBT;
|
||||||
import com.craftaro.core.nms.nbt.NBTCore;
|
|
||||||
import com.craftaro.core.third_party.de.tr7zw.nbtapi.NBTItem;
|
import com.craftaro.core.third_party.de.tr7zw.nbtapi.NBTItem;
|
||||||
import com.craftaro.epichoppers.hopper.levels.modules.Module;
|
import com.craftaro.epichoppers.hopper.levels.modules.Module;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -45,9 +44,7 @@ public class LevelManagerImpl implements LevelManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEpicHopper(ItemStack item) {
|
public boolean isEpicHopper(ItemStack item) {
|
||||||
NBTCore nbt = Nms.getImplementations().getNbt();
|
if (NBT.readNbt(item).hasTag("level")) {
|
||||||
|
|
||||||
if (nbt.of(item).has("level")) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user