diff --git a/api/src/main/java/me/lucko/luckperms/api/manager/CachedDataManager.java b/api/src/main/java/me/lucko/luckperms/api/manager/CachedDataManager.java index c0b4d9499..961f25e6c 100644 --- a/api/src/main/java/me/lucko/luckperms/api/manager/CachedDataManager.java +++ b/api/src/main/java/me/lucko/luckperms/api/manager/CachedDataManager.java @@ -1,5 +1,5 @@ /* - * This file is part of luckperms, licensed under the MIT License. + * This file is part of LuckPerms, licensed under the MIT License. * * Copyright (c) lucko (Luck) * Copyright (c) contributors diff --git a/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiCachedDataManager.java b/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiCachedDataManager.java index ef3595d17..1ee3cedbb 100644 --- a/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiCachedDataManager.java +++ b/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiCachedDataManager.java @@ -1,5 +1,5 @@ /* - * This file is part of luckperms, licensed under the MIT License. + * This file is part of LuckPerms, licensed under the MIT License. * * Copyright (c) lucko (Luck) * Copyright (c) contributors diff --git a/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiStorage.java b/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiStorage.java index b1fbf96c0..73e77412c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiStorage.java +++ b/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiStorage.java @@ -31,7 +31,6 @@ import me.lucko.luckperms.api.Log; import me.lucko.luckperms.api.LogEntry; import me.lucko.luckperms.api.Track; import me.lucko.luckperms.api.User; -import me.lucko.luckperms.common.api.LuckPermsApiProvider; import me.lucko.luckperms.common.plugin.LuckPermsPlugin; import me.lucko.luckperms.common.storage.Storage; @@ -63,12 +62,10 @@ public class ApiStorage implements me.lucko.luckperms.api.Storage { } private final LuckPermsPlugin plugin; - private final LuckPermsApiProvider apiProvider; private final Storage handle; - public ApiStorage(LuckPermsPlugin plugin, LuckPermsApiProvider apiProvider, Storage handle) { + public ApiStorage(LuckPermsPlugin plugin, Storage handle) { this.plugin = plugin; - this.apiProvider = apiProvider; this.handle = handle; } @@ -94,130 +91,130 @@ public class ApiStorage implements me.lucko.luckperms.api.Storage { @Override public @NonNull CompletableFuture logAction(@NonNull LogEntry entry) { - return this.apiProvider.getActionLogger().submitToStorage(entry) + return this.plugin.getApiProvider().getActionLogger().submitToStorage(entry) .thenApply(r -> true) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture getLog() { - return this.apiProvider.getActionLogger().getLog().exceptionally(consumeExceptionToNull()); + return this.plugin.getApiProvider().getActionLogger().getLog().exceptionally(consumeExceptionToNull()); } @Override public @NonNull CompletableFuture loadUser(@NonNull UUID uuid, String username) { - return this.apiProvider.getUserManager().loadUser(uuid, username) + return this.plugin.getApiProvider().getUserManager().loadUser(uuid, username) .thenApply(r -> true) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture saveUser(@NonNull User user) { - return this.apiProvider.getUserManager().saveUser(user) + return this.plugin.getApiProvider().getUserManager().saveUser(user) .thenApply(r -> true) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture> getUniqueUsers() { - return this.apiProvider.getUserManager().getUniqueUsers().exceptionally(consumeExceptionToNull()); + return this.plugin.getApiProvider().getUserManager().getUniqueUsers().exceptionally(consumeExceptionToNull()); } @Override public @NonNull CompletableFuture>> getUsersWithPermission(@NonNull String permission) { - return this.apiProvider.getUserManager().getWithPermission(permission).exceptionally(consumeExceptionToNull()); + return this.plugin.getApiProvider().getUserManager().getWithPermission(permission).exceptionally(consumeExceptionToNull()); } @Override public @NonNull CompletableFuture createAndLoadGroup(@NonNull String name) { - return this.apiProvider.getGroupManager().createAndLoadGroup(name) + return this.plugin.getApiProvider().getGroupManager().createAndLoadGroup(name) .thenApply(r -> true) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture loadGroup(@NonNull String name) { - return this.apiProvider.getGroupManager().loadGroup(name) + return this.plugin.getApiProvider().getGroupManager().loadGroup(name) .thenApply(Optional::isPresent) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture loadAllGroups() { - return this.apiProvider.getGroupManager().loadAllGroups() + return this.plugin.getApiProvider().getGroupManager().loadAllGroups() .thenApply(r -> true) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture saveGroup(@NonNull Group group) { - return this.apiProvider.getGroupManager().saveGroup(group) + return this.plugin.getApiProvider().getGroupManager().saveGroup(group) .thenApply(r -> true) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture deleteGroup(@NonNull Group group) { - return this.apiProvider.getGroupManager().deleteGroup(group) + return this.plugin.getApiProvider().getGroupManager().deleteGroup(group) .thenApply(r -> true) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture>> getGroupsWithPermission(@NonNull String permission) { - return this.apiProvider.getGroupManager().getWithPermission(permission) + return this.plugin.getApiProvider().getGroupManager().getWithPermission(permission) .exceptionally(consumeExceptionToNull()); } @Override public @NonNull CompletableFuture createAndLoadTrack(@NonNull String name) { - return this.apiProvider.getTrackManager().createAndLoadTrack(name) + return this.plugin.getApiProvider().getTrackManager().createAndLoadTrack(name) .thenApply(r -> true) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture loadTrack(@NonNull String name) { - return this.apiProvider.getTrackManager().loadTrack(name) + return this.plugin.getApiProvider().getTrackManager().loadTrack(name) .thenApply(Optional::isPresent) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture loadAllTracks() { - return this.apiProvider.getTrackManager().loadAllTracks() + return this.plugin.getApiProvider().getTrackManager().loadAllTracks() .thenApply(r -> true) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture saveTrack(@NonNull Track track) { - return this.apiProvider.getTrackManager().saveTrack(track) + return this.plugin.getApiProvider().getTrackManager().saveTrack(track) .thenApply(r -> true) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture deleteTrack(@NonNull Track track) { - return this.apiProvider.getTrackManager().deleteTrack(track) + return this.plugin.getApiProvider().getTrackManager().deleteTrack(track) .thenApply(r -> true) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture saveUUIDData(@NonNull String username, @NonNull UUID uuid) { - return this.apiProvider.getUserManager().savePlayerData(uuid, username) + return this.plugin.getApiProvider().getUserManager().savePlayerData(uuid, username) .thenApply(r -> true) .exceptionally(consumeExceptionToFalse()); } @Override public @NonNull CompletableFuture getUUID(@NonNull String username) { - return this.apiProvider.getUserManager().lookupUuid(username).exceptionally(consumeExceptionToNull()); + return this.plugin.getApiProvider().getUserManager().lookupUuid(username).exceptionally(consumeExceptionToNull()); } @Override public @NonNull CompletableFuture getName(@NonNull UUID uuid) { - return this.apiProvider.getUserManager().lookupUsername(uuid).exceptionally(consumeExceptionToNull()); + return this.plugin.getApiProvider().getUserManager().lookupUsername(uuid).exceptionally(consumeExceptionToNull()); } }