Class Elements
- java.lang.Object
-
- ca.stellardrift.permissionsex.minecraft.command.Elements
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceElements.PexExecutor<C>
-
Field Summary
Fields Modifier and Type Field Description static cloud.commandframework.arguments.flags.CommandFlag<ca.stellardrift.permissionsex.context.ContextValue<?>>FLAG_CONTEXTstatic cloud.commandframework.arguments.flags.CommandFlag<Void>FLAG_TRANSIENT
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<ca.stellardrift.permissionsex.context.ContextValue<?>>contexts(cloud.commandframework.context.CommandContext<?> context)static <C> BiFunction<cloud.commandframework.context.CommandContext<C>,String,List<String>>engineCompletions(BiFunction<ca.stellardrift.permissionsex.PermissionsEngine,String,List<String>> completer)static <C> cloud.commandframework.execution.CommandExecutionHandler<C>handler(Elements.PexExecutor<C> executor)static <V> BiConsumer<@Nullable V,@Nullable Throwable>messageSender(Commander src, Consumer<Consumer<net.kyori.adventure.text.Component>> callback)Message a subject with the result of a completable future.static <V> BiConsumer<V,Throwable>messageSender(Commander src, net.kyori.adventure.text.Component message)To be used withCompletableFuture.whenComplete(BiConsumer)static <V> CompletableFuture<V>toCompletableFuture(org.spongepowered.configurate.reactive.Publisher<V> publisher)
-
-
-
Field Detail
-
FLAG_TRANSIENT
public static final cloud.commandframework.arguments.flags.CommandFlag<Void> FLAG_TRANSIENT
-
FLAG_CONTEXT
public static cloud.commandframework.arguments.flags.CommandFlag<ca.stellardrift.permissionsex.context.ContextValue<?>> FLAG_CONTEXT
-
-
Method Detail
-
contexts
public static Set<ca.stellardrift.permissionsex.context.ContextValue<?>> contexts(cloud.commandframework.context.CommandContext<?> context)
-
messageSender
public static <V> BiConsumer<V,Throwable> messageSender(Commander src, net.kyori.adventure.text.Component message)
To be used withCompletableFuture.whenComplete(BiConsumer)
-
messageSender
public static <V> BiConsumer<@Nullable V,@Nullable Throwable> messageSender(Commander src, Consumer<Consumer<net.kyori.adventure.text.Component>> callback)
Message a subject with the result of a completable future.intended to be used with
CompletableFuture.whenComplete(BiConsumer)- Type Parameters:
V- upstream input value- Parameters:
src- the commander to receive the responsecallback- the callback to execute on completion- Returns:
- a handler function for a future
-
toCompletableFuture
public static <V> CompletableFuture<V> toCompletableFuture(org.spongepowered.configurate.reactive.Publisher<V> publisher)
-
handler
public static <C> cloud.commandframework.execution.CommandExecutionHandler<C> handler(Elements.PexExecutor<C> executor)
-
engineCompletions
public static <C> BiFunction<cloud.commandframework.context.CommandContext<C>,String,List<String>> engineCompletions(BiFunction<ca.stellardrift.permissionsex.PermissionsEngine,String,List<String>> completer)
-
-