diff options
author | isXander <xander@isxander.dev> | 2024-06-12 17:15:09 +0100 |
---|---|---|
committer | isXander <xander@isxander.dev> | 2024-06-12 17:15:09 +0100 |
commit | 566fb6c498d571281c94029f8dfbac5e5077600c (patch) | |
tree | 7b92ee139e0e6e2cdd8d8619c62f4f7d031aad42 /src/main/kotlin | |
parent | 305718e163f91802a4bc1c1ed6540febb2ce204e (diff) | |
download | YetAnotherConfigLib-566fb6c498d571281c94029f8dfbac5e5077600c.tar.gz YetAnotherConfigLib-566fb6c498d571281c94029f8dfbac5e5077600c.tar.bz2 YetAnotherConfigLib-566fb6c498d571281c94029f8dfbac5e5077600c.zip |
Changelog and minor changes
Diffstat (limited to 'src/main/kotlin')
-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() |