From bb0fb204576b4140a69760f5bacf28f3be4ae5ee Mon Sep 17 00:00:00 2001 From: Owen Stubbs Date: Fri, 19 May 2023 21:09:28 +0100 Subject: [PATCH] EMCWrapper 0.10.2 -> 0.11.0 --- gradle.properties | 2 +- src/main/java/net/emc/emce/caches/AllianceDataCache.java | 4 ++-- src/main/java/net/emc/emce/caches/Cache.java | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index 103739b..3b4f166 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,4 @@ maven_group = net.emc.emce cloth_config_version=10.0.96 mod_menu_version=6.2.2 adventure_fabric_version=5.8.0 -wrapper_version=0.10.2 \ No newline at end of file +wrapper_version=0.11.0 \ No newline at end of file diff --git a/src/main/java/net/emc/emce/caches/AllianceDataCache.java b/src/main/java/net/emc/emce/caches/AllianceDataCache.java index 3abcc25..7ee5977 100644 --- a/src/main/java/net/emc/emce/caches/AllianceDataCache.java +++ b/src/main/java/net/emc/emce/caches/AllianceDataCache.java @@ -16,7 +16,7 @@ public class AllianceDataCache extends Cache> { public static final AllianceDataCache INSTANCE = new AllianceDataCache(); @Override - public CompletableFuture<@NotNull Map> getCache() { + public CompletableFuture> getCache() { return CompletableFuture.supplyAsync(() -> { if (this.cachedData == null || this.needsUpdate()) { this.updating = true; @@ -41,4 +41,4 @@ public void clear() { this.cachedData.clear(); super.clear(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/emc/emce/caches/Cache.java b/src/main/java/net/emc/emce/caches/Cache.java index 57cd13c..6c637d9 100644 --- a/src/main/java/net/emc/emce/caches/Cache.java +++ b/src/main/java/net/emc/emce/caches/Cache.java @@ -1,7 +1,5 @@ package net.emc.emce.caches; -import org.jetbrains.annotations.NotNull; - import java.time.Instant; import java.util.concurrent.CompletableFuture; @@ -20,9 +18,9 @@ public void update() { this.updating = false; } - public abstract CompletableFuture<@NotNull T> getCache(); + public abstract CompletableFuture getCache(); public void clear() { this.cachedData = null; } -} +} \ No newline at end of file