Added more API and features for Events

This commit is contained in:
Sn0wStorm
2019-11-13 22:07:22 +01:00
parent 48a15a0e82
commit 3332354846
29 changed files with 672 additions and 224 deletions
@@ -291,4 +291,13 @@ public class LegacyUtil {
}
}
@SuppressWarnings("deprecation")
public static boolean hasBytesItem(ItemMeta meta, NamespacedKey key) {
if (NewNbtVer) {
return meta.getPersistentDataContainer().has(key, org.bukkit.persistence.PersistentDataType.BYTE_ARRAY);
} else {
return meta.getCustomTagContainer().hasCustomTag(key, org.bukkit.inventory.meta.tags.ItemTagType.BYTE_ARRAY);
}
}
}