Skip to content

Commit 745622f

Browse files
committed
update build.gradle.kts
1 parent e7343b5 commit 745622f

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

build.gradle.kts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ val BUILD_PROPS = mapOf(
111111
"git_cm_hash" to GIT_INFO.gitHashFull,
112112
)
113113

114-
tasks.withType<JavaCompile>().configureEach {
114+
tasks.named<JavaCompile>("compileJava") {
115115
options.encoding = "UTF-8"
116116
options.release.set(21)
117117
}
118118

119-
tasks.withType<ProcessResources>().configureEach {
119+
tasks.named<ProcessResources>("processResources") {
120120
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
121121
outputs.upToDateWhen { false }
122122

@@ -139,11 +139,12 @@ tasks.withType<ProcessResources>().configureEach {
139139
inputs.files(tasks.named<JavaCompile>("compileJava").map { it.outputs.files })
140140
}
141141

142-
tasks.withType<Jar>().configureEach {
143-
if (this !is ShadowJar) enabled = false
142+
tasks.named<Jar>("jar") {
143+
enabled = false
144144
}
145145

146-
tasks.withType<ShadowJar>().configureEach {
146+
tasks.named<ShadowJar>("shadowJar") {
147+
enabled = true
147148
doFirst {
148149
delete(layout.buildDirectory.dir("libs"))
149150
mkdir(layout.buildDirectory.dir("libs"))
@@ -168,7 +169,7 @@ tasks.register("printVars") {
168169
}
169170
}
170171

171-
tasks.withType<RunServer>().configureEach {
172+
tasks.named<RunServer>("runServer") {
172173
minecraftVersion("1.12.2")
173174
runDirectory.set(layout.projectDirectory.dir("run/paper"))
174175
jvmArgs("-Dcom.mojang.eula.agree=true")
@@ -178,16 +179,16 @@ tasks.withType<RunServer>().configureEach {
178179
}
179180
}
180181

181-
tasks.withType<RunWaterfall>().configureEach {
182+
tasks.named<RunWaterfall>("runWaterfall") {
182183
waterfallVersion("1.21")
183184
runDirectory.set(layout.projectDirectory.dir("run/waterfall"))
184185
downloadPlugins {
185186
github("lax1dude", "eaglerxserver", "v" + EAGXS_VER, "EaglerXServer.jar")
186187
}
187188
}
188189

189-
tasks.withType<RunVelocity>().configureEach {
190-
velocityVersion("3.4.0-SNAPSHOT")
190+
tasks.named<RunVelocity>("runVelocity") {
191+
velocityVersion("3.5.0-SNAPSHOT")
191192
runDirectory.set(layout.projectDirectory.dir("run/velocity"))
192193
downloadPlugins {
193194
github("lax1dude", "eaglerxserver", "v" + EAGXS_VER, "EaglerXServer.jar")

src/main/java/xyz/webmc/originblacklist/velocity/OriginBlacklistVelocity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public final void runAsync(final Runnable task) {
242242

243243
@Override
244244
public final void shutdown() {
245-
for (ScheduledTask task : this.proxy.getScheduler().tasksByPlugin(this.plugin)) {
245+
for (final ScheduledTask task : this.proxy.getScheduler().tasksByPlugin(this.plugin)) {
246246
task.cancel();
247247
}
248248
}

0 commit comments

Comments
 (0)