Refactor cached data away from cache

This commit is contained in:
William committed 2023-03-21 19:23:45 +00:00
1 parent b095c92854
commit a959aa9519
14 files changed
+166 -373

No files matched your search

@@ -95,14 +95,6 @@ public interface HuskHomes extends TaskRunner, EventDispatcher {
@NotNull
Database getDatabase();
/**
* The {@link Cache} that holds cached data
*
* @return the plugin {@link Cache}
*/
@NotNull
Cache getCache();
/**
* The {@link Validator} for validating thome names and descriptions
*
@@ -342,11 +334,25 @@ public interface HuskHomes extends TaskRunner, EventDispatcher {
.toList();
}
@NotNull
Set<UUID> getCurrentlyOnWarmup();
/**
* Returns if the given user is currently warming up to teleport to a home.
*
* @param userUuid The user to check.
* @return If the user is currently warming up.
*/
default boolean isWarmingUp(@NotNull UUID userUuid) {
return this.getCurrentlyOnWarmup().contains(userUuid);
}
/**
* Reloads the {@link Settings} and {@link Locales} from their respective config files
*
* @return a {@link CompletableFuture} that will be completed when the plugin reload is complete and if it was successful
* @return {@code true} if the reload was successful, {@code false} otherwise
*/
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
boolean loadConfigs();
@NotNull