1. Hey, have you ever wanted to be able to code a Bukkit/Spigot plugin? Don't you know how to? Do you want to learn? This is the right thread for you then! With these 10 easy steps, you can easily code your first plugin!

    Step one - Downloading Software
    I personally prefer you to use Eclipse, if you're not familiar with coding at all, else try IntelliJ.
    1. Go to Eclipse's download page
    Now what you see should be like [​IMG] 2. Click "Get eclipse Neon" or click HERE to download it.
    3. Follow downloader's guides.
    4. Eclipse will prompt you about setting your workspace, I'd suggest you create a new folder called "workspace" and select that.

    Step two - Creating your first project

    1. What you should see is this:

    2. Click the button on right top corner.

    3. Great! You have found your way to Package explorer!

    4. Create new Java project

    5. Set whatever you want, as Project name.
    6. Click "Finish"

    7. Now what you see on package explorer is your project, it should have the name you set as Project name earlier.

    8. Go to your project properties: [​IMG]
    (Alternative method: ALT + ENTER)
    9. On properties, select Java build Path.
    10. Select "Libraries" Now, in libraries, you should see this
    11. [​IMG]

    12. Click on "Add External JARs..." [​IMG]

    13. You need to have Spigot CraftBukkit JAR file for this step if you don't have it yet. You need to download it, I'd suggest you to use THIS website to get it.
    Basically, next, you need to select your Spigot/Bukkit JAR file and select it and click open

    14. After selecting Spigot/Bukkit jar and applying it, you should see new "Referenced libraries" on your project. [​IMG]

    Step three - Create a path for your code.

    1. Click on "src" and create new Package called "me.<yourname>.<your project name>" or any other such as "net.<yourname>.<your project name>", use me. if you don't own the ".net" domain.

    16. Now you have your package! Now you can create your main class. You can call it whatever you like, but I personally prefer "<ProjectName>", "Core" or "Main". In this tutorial I will be using "Core" as main class name.


    17. You have you're first ever java class! That's amazing! :D Now let's start coding!

    18. First of all, you should define your class as "JavaPlugin", so to do that you need to type "extends JavaPlugin" after your class name.


    19. Now you need to create enable method, which enables the plugin and will be running always on server reload/restart. Let's do it!

    10. You now have onEnable method, what you need now is onDisable.


    11. Great! You now have the method to enable and disable the plugin. What we're gonna do now is our first command called "helloworld", let's get started! Shall we?

    12. Follow the tutorial I made to my channel on YouTube

    13. Now you need to create a file called "plugin.yml"

    14. Once you've created your plugin.yml it should show up in package explorer.

    15. Click on it, it should open it up

    16. Next thing we're gonna do is specifying our project name, author, version and register the command we made.

    17. [​IMG]
    Click here to get example plugin.yml

    18. Once you've edited plugin.yml, it should look like this
    18. Great! You have now completed coding your first ever plugin! What we need to is now is to export your project to a JAR file!

    Step four - Exporting your plugin to JAR file
    1. Right-click your project name.
    2. Click on "Export"
    3. [​IMG]
    4. Click "Finish"

    5. YAY! You have completed your first ever plugin and you now have it as JAR file too! You can now move it to your server plugins folder and use it!


    Thank you for following my tutorial, doing this took a nice time, so I really appreciate if you rated this thread! If you're having any problems, make sure to comment and I'll try to help you. Thank you once again for taking your time to read my thread! <3

    Last edited: Sep 28, 2017
    • Like x 33
    • Useful x 9
    • Hype Train x 2
    • Helper Lapis x 2
    • Disagree x 1
    • Mod Emerald x 1
  2. Reserved.
  3. Really nice guide Skaiz! I'll give it a go. ;)
    • Hype Train Hype Train x 3
    • Useful Useful x 2
  4. M0N3Y

    M0N3Y Well-Known Member

    Slate SLATE
    HYPE!!! Will be using this in the near future
    • Like Like x 2
  5. Awesome guide, a lot of effort went into this and it's really paid off! Hopefully it'll help a lot of people!
    • Like Like x 1
  6. Hiiva

    Hiiva Well-Known Member

    Amico AMICO
  7. Avertings

    Avertings Well-Known Member

    I have always wanted to learn how to write plugins, thanks!
    • Hype Train Hype Train x 1
  8. I truly hope this helps you to learn coding!
  9. zengamer155

    zengamer155 New Member

    well if i know someone who can code minecraft plugins can you give him a rank on hypixel like how coders like AgentK do?
  10. Unfortunately, I cannot give rank to your friend, I do not have the ability to do that and although I had permission, they would need to purchase it on store.hypixel.net.
  11. zengamer155

    zengamer155 New Member

    Yeah i know you don't and i have a question
    Do you make plugins?
  12. I do! :p
  13. Plochem

    Plochem Well-Known Member

    IceSquad ICE
    Nice beginner guide!
    • Like Like x 1
  14. zengamer155

    zengamer155 New Member

    am thinking if we can make a server and make plugins and minigames i have a lot of friends who can help what is your opinion
  15. TurtleRy

    TurtleRy Well-Known Member

    kind-of complicated but it's cool <3
    • Like Like x 1
  16. Well this guide seems great for beginners at least!
    • Like Like x 1
  17. Core is not a good main class name, it should be the name of your project for example if you made a paintball plugin it'd be Paintball. Also you should not recommend people to just "use net.<username>.<project>", you should use me. if you do not own a domain.

  18. [​IMG]

    Also, I personally own https://skaizdoesmc.net/
  19. Nice image, I can read you know. Do not suggest "Core" or "Main", they are bad practices and shouldn't happen as I said in my post. Thanks for the image though! So hard to read. Secondly, did I say you didn't? No. I simply said you shouldn't just say
    without saying they should own the domain and if they don't use me.

    Believe it or not, I am here to help, you responding with an image proving my point and a saying something in response to what I didn't even say isn't helpful and just makes me have to respond with the same thing.
  20. Hi, thank you for your feedback, I fixed package part.

Share This Page