Skip to content

Commit 5045070

Browse files
committed
fix: error log on closing server
1 parent c984e8a commit 5045070

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ plugins {
1919
}
2020

2121
group = 'dev.entree'
22-
version = '2.1.0'
22+
version = '2.1.1'
2323

2424
repositories {
2525
mavenCentral()

src/main/kotlin/dev/entree/vchest/ChestPlugin.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ fun nfmt(number: Number): String =
3232
val chestPlugin: ChestPlugin get() = JavaPlugin.getPlugin(ChestPlugin::class.java)
3333

3434
fun <A, B> CompletableFuture<A>.thenApplySync(f: (A) -> B): CompletableFuture<B> {
35-
return thenApplyAsync(f, chestPlugin.syncExecutor)
35+
if (chestPlugin.isEnabled) {
36+
return thenApplyAsync(f, chestPlugin.syncExecutor)
37+
} else {
38+
return thenApply(f)
39+
}
3640
}
3741

3842
fun <A> CompletableFuture<A>.thenAcceptSyncPrime(f: (Result<A>) -> Unit): CompletableFuture<A> {

0 commit comments

Comments
 (0)