Refactor to PaperPlugin
This commit is contained in:
1 parent
ea0d678c83
commit
f82160d7d3
4 files changed
+77
-82
No files matched your search
+64
-16
@@ -1,7 +1,9 @@
|
||||
import java.io.ByteArrayOutputStream
|
||||
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
|
||||
import net.minecrell.pluginyml.paper.PaperPluginDescription
|
||||
|
||||
plugins {
|
||||
id("java")
|
||||
id("de.eldoria.plugin-yml.paper") version "0.9.0"
|
||||
}
|
||||
|
||||
group = "com.alttd"
|
||||
@@ -27,14 +29,6 @@ tasks {
|
||||
jar {
|
||||
archiveFileName.set("${rootProject.name}.jar")
|
||||
}
|
||||
|
||||
processResources {
|
||||
filteringCharset = Charsets.UTF_8.name()
|
||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||
filesMatching("plugin.yml") {
|
||||
expand(Pair("projectVersion", project.version))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -48,12 +42,66 @@ dependencies {
|
||||
}
|
||||
|
||||
fun gitCommit(): String {
|
||||
// val os = ByteArrayOutputStream()
|
||||
// project.exec {
|
||||
// isIgnoreExitValue = true
|
||||
// commandLine = "git rev-parse --short HEAD".split(" ")
|
||||
// standardOutput = os
|
||||
// }
|
||||
// return String(os.toByteArray()).trim()
|
||||
return "FIXME"
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user