Setting up the development environment

Oct 27, 2020
Setting up the development environment
  • Integrated Development Environment

    Before we can start developing a plugin we first need to setup our integrated development environment.

    What are IDE's or Integrated Development Environment?
    IDE's are the code editor you use to type in your code. This can range from a simple text editor to a full pledged language specific IDE's.

    There are a number of publicly available free IDE's in the internet.
    Some of the popular one are:
    IntelliJ IDEA

    I learned to code on Eclipe so for the remainder of this tutorial series we will be using the Eclipse IDE.

    Download and install the Java Development Kit (8-14 only)! Most IDE will not allow JRE, e.g. NetBeans.
    Remember! OpenJDK while it is good, however it lacks the stability that other JDK provides. I have been using Liberica JDK from BellSoft, it is really good.

    Now that we have an IDE we can customize the look of the IDE so we can navigate
    into the classes much easier.

    Setup for Plugin creation
    Open up the Eclipse IDE.
    In the top most toolbar click on "Window" then "Show View" and select "Package Explorer"
    A sidebar window will appear in the IDE and will allow you to navigate on the available projects
    and resources inside the projects.

    Now we can create our new java project.
    In the top most toolbar, click on "File" then select "New" then select "Java Project"
    This will open a project creation menu.
    Type in your plugin name int the project name text input slot.
    You can use any name, letter case and spacing.

    For the sake of this tutorial we will be naming our plugin "Hello World".
    For those who are confused why all programming tutorials starts with a hello world program.
    I will try to give a brief opinion.

    When you are just starting to code, you tend to get excited and frustrated to have quick results.
    To alleviate this, tutorial makers try to make programming interesting and make you produce.
    results quickly then try to explain the parts of the code you made very briefly.

    Back to the topic, after creating the project name. check the "Use an execution Environment"
    radio button is selected and the selection drop down menu beside it has your JDK selected.
    If not then select the JDK version you installed previously.
    This will ensure that your IDE will use the installed JDK to compile and run your java program.
    You can now press the "Finish" button to create the new java project.

    Congratulations! You have now a working development environment you can use to start
    developing your plugin.

    Next topic is:
    Using the Spigot Build Tools to create your first Spigot Minecraft server and importing it on your java project to utilize the Spigot api.
  • Loading...
  • Loading...