Refactor to PaperPlugin
This commit is contained in:
parent
53c259622f
commit
9fe2630f42
|
|
@ -1,12 +1,14 @@
|
|||
import java.io.ByteArrayOutputStream
|
||||
import java.io.FileOutputStream
|
||||
import java.net.URL
|
||||
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
|
||||
import net.minecrell.pluginyml.paper.PaperPluginDescription
|
||||
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
id("xyz.jpenilla.run-paper") version "2.3.0"
|
||||
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
|
||||
id("de.eldoria.plugin-yml.paper") version "0.8.0"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
@ -19,7 +21,7 @@ dependencies {
|
|||
}
|
||||
|
||||
group = "com.alttd.altitudetag"
|
||||
version = System.getenv("BUILD_NUMBER") ?: gitCommit()
|
||||
version = System.getenv("BUILD_NUMBER") ?: "DEV-BUILD"
|
||||
description = "AltitudeTag"
|
||||
|
||||
publishing {
|
||||
|
|
@ -82,21 +84,16 @@ fun download(link: String, path: File) {
|
|||
}
|
||||
}
|
||||
|
||||
fun gitCommit(): String {
|
||||
// val os = ByteArrayOutputStream()
|
||||
// project.exec {
|
||||
// commandLine = "git rev-parse --short HEAD".split(" ")
|
||||
// standardOutput = os
|
||||
// }
|
||||
// return String(os.toByteArray()).trim()
|
||||
return "FIXME"
|
||||
}
|
||||
|
||||
bukkit {
|
||||
paper {
|
||||
name = rootProject.name
|
||||
main = "$group.${rootProject.name}"
|
||||
bootstrapper = "$group.${rootProject.name}Bootstrap"
|
||||
version = "${rootProject.version}"
|
||||
apiVersion = "1.21"
|
||||
authors = listOf("Michael Ziluck", "destro174")
|
||||
depend = listOf("DecentHolograms")
|
||||
serverDependencies {
|
||||
register("DecentHolograms") {
|
||||
load = PaperPluginDescription.RelativeLoadOrder.BEFORE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.alttd.altitudetag;
|
||||
|
||||
|
||||
import io.papermc.paper.plugin.bootstrap.BootstrapContext;
|
||||
import io.papermc.paper.plugin.bootstrap.PluginBootstrap;
|
||||
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
public class AltitudeTagBootstrap implements PluginBootstrap {
|
||||
|
||||
@Override
|
||||
public void bootstrap(BootstrapContext context) {}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user