Refactor to PaperPlugin

This commit is contained in:
Len 2025-11-20 19:33:54 +01:00
parent 33f51eed09
commit aaebd64294
2 changed files with 26 additions and 4 deletions

View File

@ -2,11 +2,12 @@ import java.io.ByteArrayOutputStream
import java.io.FileOutputStream import java.io.FileOutputStream
import java.net.URL import java.net.URL
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
import net.minecrell.pluginyml.paper.PaperPluginDescription
plugins { plugins {
id("java") id("java")
id("java-library") id("java-library")
id("net.minecrell.plugin-yml.bukkit") version "0.6.0" id("de.eldoria.plugin-yml.paper") version "0.8.0"
id("xyz.jpenilla.run-paper") version "1.0.6" id("xyz.jpenilla.run-paper") version "1.0.6"
id("maven-publish") id("maven-publish")
} }
@ -99,14 +100,23 @@ fun download(link: String, path: String) {
} }
} }
bukkit { paper {
name = rootProject.name name = rootProject.name
main = "$group.${rootProject.name}" main = "$group.${rootProject.name}"
bootstrapper = "$group.${rootProject.name}Bootstrap"
version = "${rootProject.version}-${gitCommit()}" version = "${rootProject.version}-${gitCommit()}"
apiVersion = "1.21" apiVersion = "1.21"
authors = listOf("destro174") authors = listOf("destro174")
depend = listOf("Vault") serverDependencies {
softDepend = listOf("GriefPrevention") register("Vault") {
load = PaperPluginDescription.RelativeLoadOrder.BEFORE
}
register("GriefPrevention") {
required = false
}
}
permissions { permissions {
register("playershops.admin") { register("playershops.admin") {

View File

@ -0,0 +1,12 @@
package com.alttd.playershops;
import io.papermc.paper.plugin.bootstrap.BootstrapContext;
import io.papermc.paper.plugin.bootstrap.PluginBootstrap;
@SuppressWarnings("UnstableApiUsage")
public class PlayerShopsBootstrap implements PluginBootstrap {
@Override
public void bootstrap(BootstrapContext context) {}
}