mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-25 20:24:26 +00:00
Cleanup command abstraction classes
This commit is contained in:
139 files changed
+933
-997
No files matched your search
+1
-1
@@ -75,7 +75,7 @@ public final class PermissionDescriptionProxy implements PermissionDescription,
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public @NonNull CompletableFuture<Map<SubjectReference, Boolean>> findAssignedSubjects(@NonNull String s) {
|
||||
return (CompletableFuture) this.handle.findAssignedSubjects(s);
|
||||
}
|
||||
|
||||
+3
@@ -88,6 +88,7 @@ public final class SubjectCollectionProxy implements SubjectCollection, ProxiedS
|
||||
return this.handle.getLoadedSubjects().stream().map(LPSubject::sponge).collect(ImmutableCollectors.toSet());
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull CompletableFuture<Set<String>> getAllIdentifiers() {
|
||||
return (CompletableFuture) this.handle.getAllIdentifiers();
|
||||
@@ -103,11 +104,13 @@ public final class SubjectCollectionProxy implements SubjectCollection, ProxiedS
|
||||
return this.handle.getService().getReferenceFactory().obtain(getIdentifier(), subjectIdentifier);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull CompletableFuture<Map<SubjectReference, Boolean>> getAllWithPermission(@NonNull String s) {
|
||||
return (CompletableFuture) this.handle.getAllWithPermission(s);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull CompletableFuture<Map<SubjectReference, Boolean>> getAllWithPermission(@NonNull Set<Context> set, @NonNull String s) {
|
||||
return (CompletableFuture) this.handle.getAllWithPermission(CompatibilityUtil.convertContexts(set), s);
|
||||
|
||||
+4
@@ -62,6 +62,7 @@ public final class SubjectDataProxy implements SubjectData, ProxiedServiceObject
|
||||
this.ref.resolveLp().thenApply(LPSubject::getTransientSubjectData);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull Map<Set<Context>, Map<String, Boolean>> getAllPermissions() {
|
||||
return (Map) handle().thenApply(handle -> handle.getAllPermissions().entrySet().stream()
|
||||
@@ -95,6 +96,7 @@ public final class SubjectDataProxy implements SubjectData, ProxiedServiceObject
|
||||
return handle().thenCompose(handle -> handle.clearPermissions(CompatibilityUtil.convertContexts(contexts)));
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull Map<Set<Context>, List<org.spongepowered.api.service.permission.SubjectReference>> getAllParents() {
|
||||
return (Map) handle().thenApply(handle -> handle.getAllParents().entrySet().stream()
|
||||
@@ -104,6 +106,7 @@ public final class SubjectDataProxy implements SubjectData, ProxiedServiceObject
|
||||
))).join();
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull List<org.spongepowered.api.service.permission.SubjectReference> getParents(@NonNull Set<Context> contexts) {
|
||||
return (List) handle().thenApply(handle -> handle.getParents(CompatibilityUtil.convertContexts(contexts))).join();
|
||||
@@ -129,6 +132,7 @@ public final class SubjectDataProxy implements SubjectData, ProxiedServiceObject
|
||||
return handle().thenCompose(handle -> handle.clearParents(CompatibilityUtil.convertContexts(contexts)));
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull Map<Set<Context>, Map<String, String>> getAllOptions() {
|
||||
return (Map) handle().thenApply(handle -> handle.getAllOptions().entrySet().stream()
|
||||
|
||||
+2
@@ -128,11 +128,13 @@ public final class SubjectProxy implements Subject, ProxiedSubject, ProxiedServi
|
||||
return handle().thenApply(handle -> handle.isChildOf(CompatibilityUtil.convertContexts(contexts), this.service.getReferenceFactory().obtain(parent))).join();
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull List<SubjectReference> getParents() {
|
||||
return (List) handle().thenApply(handle -> handle.getParents(getActiveContextSet())).join();
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull List<SubjectReference> getParents(@NonNull Set<Context> contexts) {
|
||||
return (List) handle().thenApply(handle -> handle.getParents(CompatibilityUtil.convertContexts(contexts))).join();
|
||||
|
||||
Reference in new issue
Block a user