
This makes your class inherit all fields and methods in the Spigot JavaPlugin class. Your Main class should extend JavaPlugin. It's common to name it with your plugin name or just Main. Now right-click on the package you just created and choose New > Java Class. *note: the IDE cant tell you if your package already exists for another plugin, you have to make sure by yourself.If both are taken, try your email, e.g.

If you own a website or a domain, set the package name to.To avoid conflicts with other plugins with the same Main class directory, the general guideline is:.You can name your package following these guidelines: In the project explorer on left, locate your module and right-click on the source folder - src, and select New > Package. The packages act like folders for your plugin. Click on the + button and select JARs and directories., locate your Spigot-API-shaded jar and click Apply. Open the Project Structure from File > Project Structure.įrom here select Modules on the left side and click on Dependencies below Name. Now you have to add the Spigot library to IntelliJ. If you previously wrote your plugins in Eclipse you can change from the modules view to the package view. The IntelliJ workspace will pop up and you see on the left side the Project explorer where Modules will be stored at. Once you have filled this in you can click Finish.

INTELLIJ GENERATE JAVADOC CODE
In this window, you can set the project name and location where the source code and other project files will be stored at. Assuming this is your first plugin on IntelliJ, just click next there.

You will be presented with the option to create the project from a template. On left select Java, and on the right side for your Project SDK select the respective Java version for your plugin. When you start up IntelliJ for the first time you will be presented with the welcome screen. JDK (depending on the minecraft version for your plugin).
