aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-plugin
diff options
context:
space:
mode:
authorOwen1212055 <[email protected]>2023-02-19 09:57:10 -0500
committerOwen1212055 <[email protected]>2023-02-19 09:57:10 -0500
commit6915dee3e3a5f2c00f32116019fc652d64349d41 (patch)
tree4f6669febc83c0f70d9137fbebcd008d57147087 /test-plugin
parent5d777995f432ad638fea5d3ccf6dc64e1c8e31df (diff)
downloadPaper-6915dee3e3a5f2c00f32116019fc652d64349d41.tar.gz
Paper-6915dee3e3a5f2c00f32116019fc652d64349d41.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