Minecraft Plugins verbinden?
Ich lerne mit momentan wie man Plugins in Minecraft macht (Spigot/Maven) ich suchte dafür Möglichkeiten wie Plugins miteinander interagieren können und kam auf custom events, scheinbar muss mein zukünftiges Core Plugin dafür eine dependency haben wofür es ein repository benötigt, dafür muss ich soweit ich es verstanden habe zum Beispiel einige bestimmte Dateien auf meinen webspace hochladen.
Jetzt zu meinen Fragen, 1. habe ich das richtig verstanden? 2. welche Dateien muss ich wie hochladen? 3. gibt es eventuell noch andere gute Möglichkeiten wie zwei Plugins gut miteinander kommunizieren können?
The easiest thing is to have a “core” plugin, which is basically an API. You can simply integrate this into another project as Jar and use the functions.
That’s what I tried but didn’t get there
Sometimes it’s a bit tricky. Google just how you can integrate a local .jar with maven
I’m guessing that you’re talking about accessing an API interface.
There are several ways to set another plugin in the pom.xml as dependency. Once a remote repository that is called by placing a web request on a server, the plugin then has been downloaded. For this, you do not necessarily have to have your own server, but can also use services like repsy.
You can also import projects locally, so that the jar file is on the same PC as the project, then you don’t need a server.
Two. Upload your plugin, so your jar file.
But you always have to program an API in your plugin, which is not a task for Java beginners. In general there are enough tutorials in the Spigot/Bukkit forum.
(This is very nice: https://bukkit.org/threads/making-an-api-then-referencing-it-in-another-plugin.1380/
I uploaded the plugin but it always comes an error message that it could not be found
Do you think you want to integrate it as Dependecy in another project?