Added WorldBorderAPI dependency to manage player boundaries dynamically during game phases. Updated game phases, respawn mechanics, and class selection to utilize the WorldBorderAPI. Reworked related components to improve boundary handling, ensuring consistent gameplay flow and preparation for future enhancements.
81 lines
2.3 KiB
Plaintext
81 lines
2.3 KiB
Plaintext
import java.util.Properties
|
|
|
|
plugins {
|
|
id("java")
|
|
}
|
|
|
|
group = "com.alttd.ctf"
|
|
|
|
dependencies {
|
|
compileOnly("com.alttd:Galaxy-API:1.21-R0.1-SNAPSHOT") {
|
|
isChanging = true
|
|
}
|
|
|
|
compileOnly("org.projectlombok:lombok:1.18.32")
|
|
annotationProcessor("org.projectlombok:lombok:1.18.32")
|
|
|
|
testImplementation(platform("org.junit:junit-bom:5.10.0"))
|
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
|
|
|
// Start JSON config dependencies
|
|
// Bean Validation API
|
|
implementation("jakarta.validation:jakarta.validation-api:3.0.2")
|
|
// Hibernate Validator (implementation)
|
|
implementation("org.hibernate:hibernate-validator:8.0.2.Final")
|
|
// Validation annotations processing
|
|
implementation("org.hibernate:hibernate-validator-annotation-processor:8.0.2.Final")
|
|
|
|
// Jackson/Dynamic Beans Integration
|
|
implementation("com.fasterxml.jackson.module:jackson-module-parameter-names:2.15.2")
|
|
// Jackson for JSON Parsing
|
|
implementation("com.fasterxml.jackson.core:jackson-databind:2.15.2")
|
|
implementation("com.fasterxml.jackson.core:jackson-annotations:2.15.2")
|
|
// End JSON config dependencies
|
|
// WorldBorderAPI
|
|
compileOnly("com.github.yannicklamprecht:worldborderapi:1.210.0:dev")
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
tasks.jar {
|
|
archiveFileName.set("CaptureTheFlag.jar")
|
|
}
|
|
|
|
val versionPropsFile = file("version.properties")
|
|
val versionProps = Properties().apply {
|
|
if (versionPropsFile.exists()) {
|
|
load(versionPropsFile.inputStream())
|
|
} else {
|
|
throw GradleException("version.properties file not found!")
|
|
}
|
|
}
|
|
|
|
val majorVersion: String = versionProps["version"] as String
|
|
var buildNumber: Int = (versionProps["buildNumber"] as String).toInt()
|
|
|
|
version = "$majorVersion.$buildNumber"
|
|
|
|
val incrementBuildNumber = tasks.register("incrementBuildNumber") {
|
|
doLast {
|
|
buildNumber++
|
|
versionProps["buildNumber"] = buildNumber.toString()
|
|
versionProps.store(versionPropsFile.outputStream(), null)
|
|
println("Build number incremented to $buildNumber")
|
|
}
|
|
}
|
|
|
|
tasks.named("build") {
|
|
dependsOn(incrementBuildNumber)
|
|
}
|
|
|
|
tasks.withType<Jar> {
|
|
manifest {
|
|
attributes(
|
|
"Implementation-Title" to project.name,
|
|
"Implementation-Version" to version,
|
|
"Build-Number" to buildNumber.toString()
|
|
)
|
|
}
|
|
} |