mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-22 23:39:49 +00:00
Cleanup command abstraction classes
This commit is contained in:
139 files changed
+933
-997
No files matched your search
+3
@@ -68,6 +68,7 @@ public final class SubjectCollectionProxy implements SubjectCollection, ProxiedS
|
||||
return this.handle.hasRegistered(s).join();
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull Iterable<Subject> getAllSubjects() {
|
||||
// this will lazily load all subjects. it will initially just get the identifiers of each subject, and will initialize dummy
|
||||
@@ -80,6 +81,7 @@ public final class SubjectCollectionProxy implements SubjectCollection, ProxiedS
|
||||
).join();
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull Map<Subject, Boolean> getAllWithPermission(@NonNull String s) {
|
||||
// again, these methods will lazily load subjects.
|
||||
@@ -92,6 +94,7 @@ public final class SubjectCollectionProxy implements SubjectCollection, ProxiedS
|
||||
).join();
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull Map<Subject, Boolean> getAllWithPermission(@NonNull Set<Context> set, @NonNull String s) {
|
||||
return (Map) 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()
|
||||
@@ -98,6 +99,7 @@ public final class SubjectDataProxy implements SubjectData, ProxiedServiceObject
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull Map<Set<Context>, List<Subject>> getAllParents() {
|
||||
return (Map) handle().thenApply(handle -> handle.getAllParents().entrySet().stream()
|
||||
@@ -110,6 +112,7 @@ public final class SubjectDataProxy implements SubjectData, ProxiedServiceObject
|
||||
)).join();
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull List<Subject> getParents(@NonNull Set<Context> contexts) {
|
||||
return (List) handle().thenApply(handle -> handle.getParents(CompatibilityUtil.convertContexts(contexts)).stream()
|
||||
@@ -147,6 +150,7 @@ public final class SubjectDataProxy implements SubjectData, ProxiedServiceObject
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull Map<Set<Context>, Map<String, String>> getAllOptions() {
|
||||
return (Map) handle().thenApply(handle -> handle.getAllOptions().entrySet().stream()
|
||||
|
||||
+2
@@ -129,6 +129,7 @@ public final class SubjectProxy implements Subject, ProxiedSubject, ProxiedServi
|
||||
)).join();
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull List<Subject> getParents() {
|
||||
return (List) handle().thenApply(handle -> handle.getParents(getActiveContextSet()).stream()
|
||||
@@ -136,6 +137,7 @@ public final class SubjectProxy implements Subject, ProxiedSubject, ProxiedServi
|
||||
.collect(ImmutableCollectors.toList())).join();
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public @NonNull List<Subject> getParents(@NonNull Set<Context> contexts) {
|
||||
return (List) handle().thenApply(handle -> handle.getParents(CompatibilityUtil.convertContexts(contexts)).stream()
|
||||
|
||||
Reference in new issue
Block a user