diff options
Diffstat (limited to 'src/main/kotlin/dev')
-rw-r--r-- | src/main/kotlin/dev/isxander/yacl3/dsl/API.kt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/kotlin/dev/isxander/yacl3/dsl/API.kt b/src/main/kotlin/dev/isxander/yacl3/dsl/API.kt index cd2c483..e3e3099 100644 --- a/src/main/kotlin/dev/isxander/yacl3/dsl/API.kt +++ b/src/main/kotlin/dev/isxander/yacl3/dsl/API.kt @@ -23,6 +23,9 @@ typealias FutureOption<T> = CompletableFuture<Option<T>> fun <T> CompletableFuture<OptionRegistrar>.futureRef(id: String): FutureOption<T> = thenCompose { it.futureRef(id) } +fun <T> CompletableFuture<OptionRegistrar>.futureRef(): RegisterableDelegateProvider<FutureOption<T>> = + RegisterableDelegateProvider({ this.futureRef(it) }, null) + fun YetAnotherConfigLib(id: String, block: RootDsl.() -> Unit) = RootDslImpl(id).apply(block).build() |