AFKDetector/build.gradle.kts

101 lines
3.2 KiB
Plaintext
Raw Normal View History

2026-07-25 15:43:58 +00:00
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
import net.minecrell.pluginyml.paper.PaperPluginDescription
2023-03-29 23:45:49 +00:00
plugins {
id("java")
2026-07-25 15:43:58 +00:00
id("de.eldoria.plugin-yml.paper") version "0.9.0"
2023-03-29 23:45:49 +00:00
}
group = "com.alttd"
2023-12-25 13:35:44 +00:00
version = System.getenv("BUILD_NUMBER") ?: gitCommit()
2023-03-29 23:45:49 +00:00
description = "Altitude AFK Detector plugin."
apply<JavaLibraryPlugin>()
tasks {
withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
}
withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
}
jar {
archiveFileName.set("${rootProject.name}.jar")
2023-03-29 23:45:49 +00:00
}
}
dependencies {
2026-07-23 19:56:32 +00:00
compileOnly("com.alttd.cosmos:cosmos-api:26.2.build.17-stable") {
2025-06-28 00:47:49 +00:00
isChanging = true
}
2026-06-08 19:51:58 +00:00
compileOnly("de.keyle:mypet-api:4.0.0-SNAPSHOT")
2025-06-28 00:47:49 +00:00
compileOnly("com.alttd:VillagerShopUI:1.1-SNAPSHOT") {
isChanging = true
}
2023-12-25 13:35:44 +00:00
}
fun gitCommit(): String {
2026-04-06 12:41:24 +00:00
return "FIXME"
2025-06-28 00:47:49 +00:00
}
2026-07-25 15:43:58 +00:00
paper {
name = rootProject.name
main = "$group.${rootProject.name}"
description = rootProject.description
bootstrapper = "$group.${rootProject.name}Bootstrap"
version = "${rootProject.version}"
apiVersion = "26.2"
authors = listOf("destro174")
serverDependencies {
register("MyPet") {
required = false
load = PaperPluginDescription.RelativeLoadOrder.BEFORE
}
}
permissions {
register("afkdetector.admin") {
description = "Admin permission for the ${rootProject.name} plugin."
default = BukkitPluginDescription.Permission.Default.FALSE
children = listOf(
"afkdetector.bypass",
"afkdetector.afklist",
"afkdetector.afkcheck",
"afkdetector.notify",
"afkdetector.reload"
)
}
register("afkdetector.bypass") {
description = "Bypass permission for the ${rootProject.name} plugin."
default = BukkitPluginDescription.Permission.Default.FALSE
children = listOf(
"afkdetector.kickexempt"
)
}
register("afkdetector.reload") {
description = "Allows reloading the ${rootProject.name} plugin."
default = BukkitPluginDescription.Permission.Default.FALSE
}
register("afkdetector.kickexempt") {
description = "Bypass permission for being afk kicked."
default = BukkitPluginDescription.Permission.Default.FALSE
}
register("afkdetector.afktime") {
description = "Master permission for custom afk time in the ${rootProject.name} plugin."
default = BukkitPluginDescription.Permission.Default.FALSE
}
register("afkdetector.afkcheck") {
description = "Allows usage of the /afkcheck command."
default = BukkitPluginDescription.Permission.Default.FALSE
}
register("afkdetector.afklist") {
description = "Allows usage of the /afklist command."
default = BukkitPluginDescription.Permission.Default.FALSE
}
register("afkdetector.notify") {
description = "Get notified when a player is afk."
default = BukkitPluginDescription.Permission.Default.FALSE
}
}
}