executorCoroutine

inline fun KytaleCommandBuilder.executorCoroutine(scope: CoroutineScope = CoroutineScope(Dispatchers.Default), crossinline block: suspend KytaleCommandContext.(CommandContext) -> Unit)

Sets a coroutine-based executor for the command

Allows using suspending functions as command executors by running them in a coroutine scope and converting the result to a CompletableFuture.

Parameters

scope

The coroutine scope to run in, defaults to Dispatchers.Default

block

The suspending executor block

See also