From 745622fa36f957ad6640abc70b797b8dbc3f03e3 Mon Sep 17 00:00:00 2001 From: Colbster937 Date: Wed, 11 Feb 2026 07:38:31 -0600 Subject: [PATCH] update build.gradle.kts --- build.gradle.kts | 19 ++++++++++--------- .../velocity/OriginBlacklistVelocity.java | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index bba9f53..01986f4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -111,12 +111,12 @@ val BUILD_PROPS = mapOf( "git_cm_hash" to GIT_INFO.gitHashFull, ) -tasks.withType().configureEach { +tasks.named("compileJava") { options.encoding = "UTF-8" options.release.set(21) } -tasks.withType().configureEach { +tasks.named("processResources") { duplicatesStrategy = DuplicatesStrategy.EXCLUDE outputs.upToDateWhen { false } @@ -139,11 +139,12 @@ tasks.withType().configureEach { inputs.files(tasks.named("compileJava").map { it.outputs.files }) } -tasks.withType().configureEach { - if (this !is ShadowJar) enabled = false +tasks.named("jar") { + enabled = false } -tasks.withType().configureEach { +tasks.named("shadowJar") { + enabled = true doFirst { delete(layout.buildDirectory.dir("libs")) mkdir(layout.buildDirectory.dir("libs")) @@ -168,7 +169,7 @@ tasks.register("printVars") { } } -tasks.withType().configureEach { +tasks.named("runServer") { minecraftVersion("1.12.2") runDirectory.set(layout.projectDirectory.dir("run/paper")) jvmArgs("-Dcom.mojang.eula.agree=true") @@ -178,7 +179,7 @@ tasks.withType().configureEach { } } -tasks.withType().configureEach { +tasks.named("runWaterfall") { waterfallVersion("1.21") runDirectory.set(layout.projectDirectory.dir("run/waterfall")) downloadPlugins { @@ -186,8 +187,8 @@ tasks.withType().configureEach { } } -tasks.withType().configureEach { - velocityVersion("3.4.0-SNAPSHOT") +tasks.named("runVelocity") { + velocityVersion("3.5.0-SNAPSHOT") runDirectory.set(layout.projectDirectory.dir("run/velocity")) downloadPlugins { github("lax1dude", "eaglerxserver", "v" + EAGXS_VER, "EaglerXServer.jar") diff --git a/src/main/java/xyz/webmc/originblacklist/velocity/OriginBlacklistVelocity.java b/src/main/java/xyz/webmc/originblacklist/velocity/OriginBlacklistVelocity.java index e77208a..6fc13a7 100644 --- a/src/main/java/xyz/webmc/originblacklist/velocity/OriginBlacklistVelocity.java +++ b/src/main/java/xyz/webmc/originblacklist/velocity/OriginBlacklistVelocity.java @@ -242,7 +242,7 @@ public final class OriginBlacklistVelocity implements IOriginBlacklistPlugin { @Override public final void shutdown() { - for (ScheduledTask task : this.proxy.getScheduler().tasksByPlugin(this.plugin)) { + for (final ScheduledTask task : this.proxy.getScheduler().tasksByPlugin(this.plugin)) { task.cancel(); } }