When developing plugins on Minecraft, I wanted to save a little time, so I will write a method to plug into the plugins of the server I want to use with one click.
Have you ever wondered why I (I) have to build each and then put the built jar file in the plugins file and reload it even though it's fine today? Quite a few developers should have thought.
Well, good news for you. Just press the green right triangle in the upper right to go through the whole process and try reload and depression in the console to try your best and greatest plugins! Let's go.
1 ... Press File 2 ... Press Project Structure 3 ... See Project Settings 4 ... Press Artifacts
5 ... Press the plus button above 6 ... Press JAR ▶ Press 7 ... From modules with dependencies 8 ... ** If there is no particular difference from the image **, press OK [^ 1]
9 ... Press the plus button near the bottom of the Output Layout
10 ... Press File
11 ... Specify the path to the project \ src \ main \ resources \ plugin.yml
12 ... press OK
13 ... Set the server plugin folder in the Output Directory
14 ... press OK
1 ... Press Build in the menu above 2 ... Press Build Artifacts 3 ... Press the Artifact you just created 4 ... Press Build
You should now have a jar with the name of your plugin in your plugins file! I did it! Then run it on the server and test it.
1 ... Press Sample Build in the upper right
2 ... Press Edit Configurations
3 ... Press the plus button on the top left
4 ... Press JAR Application
5-1 ... Change Name (optional)
5-2 ... Set Path to JAR to the path of the server jar
5-3 ... Make Working Directory the root of the server (the shallowest folder)
5-4 ... Set JRE to Default [^ 1]
5-5 ... Set Search sources using module's classpath to
After that, select the JAR Application you just created from the dropdown on the upper right, press the Run button, the server will start and the build will be loaded automatically!
Then everyone, have a good development life.
https://www.spigotmc.org/threads/tip-one-click-artifact-build-and-spigot-server-start-in-intellij.308427/
[^ 1]: In some cases, the settings may change, so please adjust according to your environment.
Recommended Posts