diff --git a/build.gradle.kts b/build.gradle.kts index cfe8cce..0bd4935 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,7 +2,7 @@ plugins { id("java") } -version = "2.6.13" +version = "2.6.14" allprojects { repositories { @@ -14,5 +14,6 @@ allprojects { maven("https://repo.extendedclip.com/content/repositories/placeholderapi/") maven("https://repo.fancyplugins.de/releases") maven("https://jitpack.io") + maven("https://ci.codemc.io/job/Tr7zw/job/Item-NBT-API/") } } \ No newline at end of file diff --git a/core/build.gradle.kts b/core/build.gradle.kts index e037b4d..2a7719a 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -20,7 +20,8 @@ dependencies { implementation("redis.clients:jedis:5.1.3") implementation("com.zaxxer:HikariCP:5.1.0") implementation("org.apache.commons:commons-lang3:3.12.0") - implementation("de.tr7zw:item-nbt-api:2.14.0") + //implementation("de.tr7zw:item-nbt-api:2.14.0") + implementation("de.tr7zw:item-nbt-api:2.14.1-SNAPSHOT") implementation("net.kyori:adventure-api:4.17.0") implementation("net.kyori:adventure-platform-bukkit:4.3.3") } diff --git a/core/src/main/java/fr/aerwyn81/headblocks/HeadBlocks.java b/core/src/main/java/fr/aerwyn81/headblocks/HeadBlocks.java index a16f0fe..3b8c6da 100644 --- a/core/src/main/java/fr/aerwyn81/headblocks/HeadBlocks.java +++ b/core/src/main/java/fr/aerwyn81/headblocks/HeadBlocks.java @@ -122,11 +122,7 @@ public void onEnable() { } private void initializeExternals() { - if (!NBT.preloadApi()) { - log.sendMessage(MessageUtils.colorize("&cNBT-API wasn't initialized properly, disabling the plugin...")); - getPluginLoader().disablePlugin(this); - return; - } + NBT.preloadApi(); MinecraftVersion.disableBStats(); diff --git a/core/src/main/java/fr/aerwyn81/headblocks/services/StorageService.java b/core/src/main/java/fr/aerwyn81/headblocks/services/StorageService.java index bb2057d..df24ef3 100644 --- a/core/src/main/java/fr/aerwyn81/headblocks/services/StorageService.java +++ b/core/src/main/java/fr/aerwyn81/headblocks/services/StorageService.java @@ -293,7 +293,9 @@ public static void unloadPlayer(Player player) { } public static void close() { - _cacheHeads.clear(); + if (_cacheHeads != null) { + _cacheHeads.clear(); + } try { if (storage != null) {