Skip to content

Commit

Permalink
EMCWrapper 0.10.2 -> 0.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen3H committed May 19, 2023
1 parent bee4d2e commit bb0fb20
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
wrapper_version=0.11.0
4 changes: 2 additions & 2 deletions src/main/java/net/emc/emce/caches/AllianceDataCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class AllianceDataCache extends Cache<Map<String, JsonObject>> {
public static final AllianceDataCache INSTANCE = new AllianceDataCache();

@Override
public CompletableFuture<@NotNull Map<String, JsonObject>> getCache() {
public CompletableFuture<Map<String, JsonObject>> getCache() {
return CompletableFuture.supplyAsync(() -> {
if (this.cachedData == null || this.needsUpdate()) {
this.updating = true;
Expand All @@ -41,4 +41,4 @@ public void clear() {
this.cachedData.clear();
super.clear();
}
}
}
6 changes: 2 additions & 4 deletions src/main/java/net/emc/emce/caches/Cache.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package net.emc.emce.caches;

import org.jetbrains.annotations.NotNull;

import java.time.Instant;
import java.util.concurrent.CompletableFuture;

Expand All @@ -20,9 +18,9 @@ public void update() {
this.updating = false;
}

public abstract CompletableFuture<@NotNull T> getCache();
public abstract CompletableFuture<T> getCache();

public void clear() {
this.cachedData = null;
}
}
}

0 comments on commit bb0fb20

Please sign in to comment.