Setting up the development environment

Feb 9, 2019
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 Eclipes so for the remainder of this tutorial series we will be using the Eclipes IDE.

    Setting-up the IDE
    Download and install the latest Java Development Kit(recomended)
    You can use the Java Runtime Environment but it is limiting.
    You can get it at the official Oracle site.
    Download the Eclipes IDE from their official website then install.

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

    Open up the Eclipes 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 exited 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 JRE or JDK selected.
    If not then select the JRE or JDK version you installed previously.
    This will ensure that your IDE will use the installed JRE or 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.

    Nex 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...