summaryrefslogtreecommitdiffhomepage
path: root/test-plugin
diff options
context:
space:
mode:
authorOwen <[email protected]>2023-02-19 09:57:10 -0500
committerGitHub <[email protected]>2023-02-19 08:57:10 -0600
commit841da90501564e5b430a8469cac6e6a77627725d (patch)
tree934f58b2dfbf689e502651e4a3ad51383779f4c0 /test-plugin
parentf9dc371fd8c56f1ad1359fc3bf1f7a40921ec66f (diff)
downloadPaper-841da90501564e5b430a8469cac6e6a77627725d.tar.gz
Paper-841da90501564e5b430a8469cac6e6a77627725d.zip
Paper Plugins (#8108)
Diffstat (limited to 'test-plugin')
-rw-r--r--test-plugin/build.gradle.kts2
-rw-r--r--test-plugin/src/main/java/io/papermc/testplugin/TestPlugin.java (renamed from test-plugin/src/main/java/io/papermc/paper/testplugin/TestPlugin.java)3
-rw-r--r--test-plugin/src/main/java/io/papermc/testplugin/TestPluginBootstrap.java13
-rw-r--r--test-plugin/src/main/java/io/papermc/testplugin/TestPluginLoader.java11
-rw-r--r--test-plugin/src/main/resources/paper-plugin.yml12
-rw-r--r--test-plugin/src/main/resources/plugin.yml7
6 files changed, 39 insertions, 9 deletions
diff --git a/test-plugin/build.gradle.kts b/test-plugin/build.gradle.kts
index 6bcdb356c5..e86b933408 100644
--- a/test-plugin/build.gradle.kts
+++ b/test-plugin/build.gradle.kts
@@ -13,7 +13,7 @@ tasks.processResources {
"apiversion" to apiVersion,
)
inputs.properties(props)
- filesMatching("plugin.yml") {
+ filesMatching("paper-plugin.yml") {
expand(props)
}
}
diff --git a/test-plugin/src/main/java/io/papermc/paper/testplugin/TestPlugin.java b/test-plugin/src/main/java/io/papermc/testplugin/TestPlugin.java
index a0c78b9d68..4e68423bb7 100644
--- a/test-plugin/src/main/java/io/papermc/paper/testplugin/TestPlugin.java
+++ b/test-plugin/src/main/java/io/papermc/testplugin/TestPlugin.java
@@ -1,9 +1,10 @@
-package io.papermc.paper.testplugin;
+package io.papermc.testplugin;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
public final class TestPlugin extends JavaPlugin implements Listener {
+
@Override
public void onEnable() {
this.getServer().getPluginManager().registerEvents(this, this);
diff --git a/test-plugin/src/main/java/io/papermc/testplugin/TestPluginBootstrap.java b/test-plugin/src/main/java/io/papermc/testplugin/TestPluginBootstrap.java
new file mode 100644
index 0000000000..e464dac8ae
--- /dev/null
+++ b/test-plugin/src/main/java/io/papermc/testplugin/TestPluginBootstrap.java
@@ -0,0 +1,13 @@
+package io.papermc.testplugin;
+
+import io.papermc.paper.plugin.bootstrap.PluginBootstrap;
+import io.papermc.paper.plugin.bootstrap.PluginProviderContext;
+import org.jetbrains.annotations.NotNull;
+
+public class TestPluginBootstrap implements PluginBootstrap {
+
+ @Override
+ public void bootstrap(@NotNull PluginProviderContext context) {
+ }
+
+}
diff --git a/test-plugin/src/main/java/io/papermc/testplugin/TestPluginLoader.java b/test-plugin/src/main/java/io/papermc/testplugin/TestPluginLoader.java
new file mode 100644
index 0000000000..084899a9fe
--- /dev/null
+++ b/test-plugin/src/main/java/io/papermc/testplugin/TestPluginLoader.java
@@ -0,0 +1,11 @@
+package io.papermc.testplugin;
+
+import io.papermc.paper.plugin.loader.PluginClasspathBuilder;
+import io.papermc.paper.plugin.loader.PluginLoader;
+import org.jetbrains.annotations.NotNull;
+
+public class TestPluginLoader implements PluginLoader {
+ @Override
+ public void classloader(@NotNull PluginClasspathBuilder classpathBuilder) {
+ }
+}
diff --git a/test-plugin/src/main/resources/paper-plugin.yml b/test-plugin/src/main/resources/paper-plugin.yml
new file mode 100644
index 0000000000..459345d794
--- /dev/null
+++ b/test-plugin/src/main/resources/paper-plugin.yml
@@ -0,0 +1,12 @@
+name: Paper-Test-Plugin
+version: ${version}
+main: io.papermc.testplugin.TestPlugin
+description: Paper Test Plugin
+author: PaperMC
+api-version: ${apiversion}
+load: STARTUP
+bootstrapper: io.papermc.testplugin.TestPluginBootstrap
+loader: io.papermc.testplugin.TestPluginLoader
+defaultPerm: FALSE
+permissions:
+dependencies:
diff --git a/test-plugin/src/main/resources/plugin.yml b/test-plugin/src/main/resources/plugin.yml
deleted file mode 100644
index 1e6adb9ff6..0000000000
--- a/test-plugin/src/main/resources/plugin.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-name: Paper-Test-Plugin
-version: ${version}
-main: io.papermc.paper.testplugin.TestPlugin
-description: Paper Test Plugin
-author: PaperMC
-api-version: ${apiversion}
-load: STARTUP