How do I make plugins?

Discussion in 'Spigot Plugin Help' started by Antisblij, Apr 24, 2020.

  1. Hi, I want to learn how to make plugins in minecraft, but I have no idea how to program or what spigot is. Is it smart to learn how to make plugins without even knowing anything? Also, how do I make them?
     
  2. Yeah SebEzra is kinda correct but I started off Spigot API without Java knowledge too.
    That is why I kindly point you to this wiki:
    https://www.spigotmc.org/wiki/spigot-plugin-development/
     
  3. No. Please. Just no. Start from learning java.
     
    • Agree Agree x 3
  4. Not really a good idea imo. I think it's good to start programming with spigot api since it shows you what code does in a way better way than learning to write console programs
     
    • Funny Funny x 1
  5. Yeah, in theory. In fact, most of beginners are copy-pasting code from guides and making just another Frankenstein's monster, also asking java basic questions here.

    In my opinion, it's good to start from java itself, and then, after at the very least 1-3 months of learning and practice, start creating plugins.
     
  6. You can see tutorials of TheSourceCode on YouTube
     
    • Like Like x 1
    • Agree Agree x 1
  7. I'd recommend learning java first to get the hang of it, then learning the spigot api and how it works.
     
    • Like Like x 1
  8. Without a doubt you should learn some Basic Java first, now it doesn't have to be highly in depth to the point of complex algorithms, modifying system processes etc. Though putting a few weeks at most into the basics will certainly give you a fantastic head start.

    What you should definitely look into is Class design, Project structure, Constructors, Getters/Setters, custom classes, inheritance and Generic types. You will also need to learn a few common data structures such as LinkedLists, Lists, HashMaps, arrays and the likes. You could easily learn and practice most of these above concepts in a week if you spend a few hours a day.

    Alternatively, lets say you go straight to learning from code examples / Youtube videos. You might learn how to implement a basic command or two, make a few event listeners etc, but then you will have no idea how to extend that into a more complex manner. You won't know how to access the data you created in other classes, or worse yet, your entire code base is shoved into one or two classes, becoming buggy and hard to work on.
     
    • Agree Agree x 1
  9. I know this is a controversial topic, but I will give my two cents.

    I (unfortunately) took the route of learning the Spigot API first, which is created in Java (facepalm). I wasted hours of Java programmers' (any my own!) time by asking questions that I would easily understand if I learned Java first. I then became unmotivated because I felt like I was lacking the knowledge to create plugins, and it was a struggle for me. I would recommend a Udemy course or even a YouTube tutorial (they actually teach and are worth it!).
    Example Tutorial: Link
     
    • Informative Informative x 1
  10. drives_a_ford

    Moderator

    You need to start by learning java. At least the very basics.

    I've seen starting "developers" time and time again asking questions in the plugin development section when they don't even grasp the very basics of java/OOP (i.e instances, classes, constructors, methods, fields). Thus when I point them in the right direction with respect to their issue they have no idea what I'm talking about.
    The rules there are rather straight forward. If you need help, you're expected to know java. People who "start by learning Spigot" keep violating that rule and thus wasting the time of the nice people who are there to help. I've noticed such people in this thread as well.

    I'll leave you with a quote from the README of the plugin development section. Just so you understand under which situations you'd expect to get help when posting issues there.
     
    • Agree Agree x 2
    • Useful Useful x 1
  11. thanks!
     
  12. @BlackNike6 Damn you beat me to it I was going to recommend Deshaan(TheSourceCode) his tutorials are generally well put together and fairly informative at least for the basics. @Antisblij Definitely go learn java first understanding the basics and having a good idea of what your are doing will pay you back ten fold when you start making plugins.

    Useful links for you:
    https://www.spigotmc.org/threads/tu...st-of-your-plugin-problems-by-yourself.48121/
    https://www.spigotmc.org/wiki/spigot-plugin-development/
    https://www.youtube.com/channel/UCNXt2MrZaqfIBknamqwzeXA (TheSourceCode)
    https://www.codecademy.com/catalog/language/java (Learn Java Basics)
     
  13. TheSourceCode is very good for learning.
     
  14. To be honest, I have been coding for a while now (a few years). I guesse that I am not a great learner.

    But, I do notice that 'TheSourceCode' does miss out a lot of details which I have learned from other YouTube videos.

    I would reccomend that you just keep on trying.
    I don't think that there is a 'suits all' solution.

    Many of us learn basic coding stuff in other languages which is logically transferable to Java.
    The key point in coding for (Minecraft) Spigot (Bukkit) is to how to navigate the API libraries to suit our intended results.
     
  15. Yes this is true he does miss out details which you willl learn elsewhere - that said the point of his videos is to provide an introduction into the spigots api - where he will make something simple to demonstrate a methods functionality - I believe he mentioned in his first episode of his spigot coding series that he was just going to show the very basics to help you get started using the spigot api.
     
  16. Start off with some easy YouTube Tutorials. There are a lot of good videos that can show you how to learn programming.

    I started by watching videos and just coded them by myself. It sounds pretty dumb at first but just try it.

    Important: Don't stop if you have errors or your plugin doesn't work. Write a thread in this forum and ask for help.
    That's better than just not doing it.
     
    • Agree Agree x 1