mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-14 02:34:07 +00:00
Allow context calculators to define "potential contexts", and use these for tab completions
This commit is contained in:
41 files changed
+321
-26
No files matched your search
@@ -94,4 +94,17 @@ public interface ContextCalculator<T> {
|
||||
*/
|
||||
void calculate(@NonNull T target, @NonNull ContextConsumer consumer);
|
||||
|
||||
/**
|
||||
* Gets a {@link ContextSet}, containing some/all of the contexts this
|
||||
* calculator could potentially submit.
|
||||
*
|
||||
* <p>The result of this call is primarily intended on providing
|
||||
* suggestions to end users when defining permissions.</p>
|
||||
*
|
||||
* @return a set of potential contexts
|
||||
*/
|
||||
default ContextSet estimatePotentialContexts() {
|
||||
return ImmutableContextSet.empty();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user