From d7525bdbd0dec2bf6b298a4f080fba673662e412 Mon Sep 17 00:00:00 2001 From: SemvdH Date: Tue, 14 Oct 2025 18:31:43 +0200 Subject: [PATCH] Setup project for plugin --- .vscode/settings.json | 3 + ic_plugin/pom.xml | 180 ++++++++++-------- .../main/java/nl/interestingcorner/App.java | 16 +- ic_plugin/src/main/resources/plugin.yml | 3 + 4 files changed, 116 insertions(+), 86 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 ic_plugin/src/main/resources/plugin.yml diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c5f3f6b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "interactive" +} \ No newline at end of file diff --git a/ic_plugin/pom.xml b/ic_plugin/pom.xml index e1806fa..c2ce2d8 100644 --- a/ic_plugin/pom.xml +++ b/ic_plugin/pom.xml @@ -1,90 +1,110 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - nl.interestingcorner - ic_plugin - 1.0-SNAPSHOT + nl.interestingcorner + ic_plugin + 1.0-SNAPSHOT - ic_plugin - - http://www.example.com + ic_plugin + + http://www.example.com - - UTF-8 - 17 - + + UTF-8 + 17 + + + + spigot-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + + + + org.junit + junit-bom + 5.11.0 + pom + import + + + - - - org.junit - junit-bom - 5.11.0 - pom - import - + + org.junit.jupiter + junit-jupiter-api + test + + + + org.junit.jupiter + junit-jupiter-params + test + + + org.spigotmc + spigot-api + 1.21.8-R0.1-SNAPSHOT + provided + - - - - org.junit.jupiter - junit-jupiter-api - test - - - - org.junit.jupiter - junit-jupiter-params - test - - - - - - - - - maven-clean-plugin - 3.4.0 - - - - maven-resources-plugin - 3.3.1 - - - maven-compiler-plugin - 3.13.0 - - - maven-surefire-plugin - 3.3.0 - - - maven-jar-plugin - 3.4.2 - - - maven-install-plugin - 3.1.2 - - - maven-deploy-plugin - 3.1.2 - - - - maven-site-plugin - 3.12.1 - - - maven-project-info-reports-plugin - 3.6.1 - - - - + + ${project.basedir}/src/main/java + + + ${project.basedir}/src/main/resources + + plugin.yml + + + + + + + + maven-clean-plugin + 3.4.0 + + + + maven-resources-plugin + 3.3.1 + + + maven-compiler-plugin + 3.13.0 + + + maven-surefire-plugin + 3.3.0 + + + maven-jar-plugin + 3.4.2 + + + maven-install-plugin + 3.1.2 + + + maven-deploy-plugin + 3.1.2 + + + + maven-site-plugin + 3.12.1 + + + maven-project-info-reports-plugin + 3.6.1 + + + + diff --git a/ic_plugin/src/main/java/nl/interestingcorner/App.java b/ic_plugin/src/main/java/nl/interestingcorner/App.java index a1d310c..67554c7 100644 --- a/ic_plugin/src/main/java/nl/interestingcorner/App.java +++ b/ic_plugin/src/main/java/nl/interestingcorner/App.java @@ -1,10 +1,14 @@ package nl.interestingcorner; -/** - * Hello world! - */ -public class App { - public static void main(String[] args) { - System.out.println("Hello World!"); +import org.bukkit.plugin.java.JavaPlugin; + +public class App extends JavaPlugin { + @Override + public void onEnable() { + getLogger().info("Hello, SpigotMC!"); + } + @Override + public void onDisable() { + getLogger().info("See you again, SpigotMC!"); } } diff --git a/ic_plugin/src/main/resources/plugin.yml b/ic_plugin/src/main/resources/plugin.yml new file mode 100644 index 0000000..74d31d1 --- /dev/null +++ b/ic_plugin/src/main/resources/plugin.yml @@ -0,0 +1,3 @@ +main: nl.interestingcorner.App +name: InterestingCornerPlugin +version: 0.1 \ No newline at end of file