Solved Java Then Bukkit API?

Discussion in 'Plugin Development' started by Sean0402, Aug 26, 2014.

Thread Status:
Not open for further replies.
  1. Hi guys, I was wondering. I've always wanted to code my awesome plugins. Such as stuff for my server to benefit others. But it's actually quite hard to learn the Bukkit API and remember it so quickly.. Without having to go back and think "What is that?" I don't even remember half the stuff I wrote which means I don't know what it means...

    The main point is .. Should I learn Java coding.. Then continue onto the Bukkit API?

    I will appreciate anyone's comments!
  2. Offline


    Learn Java, then do Bukkit. It makes life a lot easier.
    0566, es359, _LB and 3 others like this.
  3. I never learnt Java, and here you see me, coding bukkit plugins.
    But if you can, do learn Java, as what the above comment says is true.
    hintss likes this.
  4. Offline


    If you code without a better understanding of what you're doing, there are going to be things you could optimize or do differently. There will probably be things that you can do after learning Java that you probably couldn't have done without the knowledge.. Also, without learning java, coming here with issues that are as simple as can be will just annoy a lot of devs. Best of luck!
  5. Offline


    XXLuigiMario I wouldn't have yourself as an example for "coding plugins".
    Sean0402 bukkit API requires knowing Java. Because of this, there's no reason why you shouldn't learn Java properly before proceeding to bukkit API.
  6. SmooshCakez I guessed it would be easier. The only problem is that if I go off for say 1 week? I will forgot half the stuff I done. Which is the problem I used pogostick29dev plugins to help me learn the Bukkit API. It helped abit. I know the basics of it of course now. But I will try learn main Java then continue onto Bukkit API. Another question. How long should I do Java for? Then move onto Bukkit API?

    @XXLuigiMaria As I said to SmooshCakez I am learning the Bukkit API but it's too confusing at times. And if I do learn Java. How will it benefit? Because as some Java I might of learnt might not be useful in the Bukkit API.
  7. I only have one plugin published, that doesn't mean I haven't coded more...
  8. Offline


    Sean0402 you will learn Java until you are able to easily debug and read your own code, understand javadocs, and the ability to code sizeable Java applets on your own. This is not something you can rush.

    You wont "forget half the things in one week", unless you are trying to memorise Java and bukkit as a shopping list, which means you will never proceed like this. You need to know the foundation, and from there you will be able to attach new specks of information much more easily.
    hintss likes this.
  9. The Bukkit API is not very complicated until you start looking deeper.
    hintss likes this.
  10. Offline


    Ys learn java and then bukkit API, thanks for asking that!
    Think of it like building, java is the foundations and bukkit API is one of the floors. Although you can be building foundations each time you build a wall or a pylon, it would be harder and ne day the building will fall into pieces
  11. Necrodoom Thanks for the support! I'm am going to go learn Java right now. and I'll write the key words down that I think I might forgot. Then I will memorise then over time.. And then there will be no more "Forgetting things" :)
  12. Offline


    Somehow I don't think that is quite what you wanted to say.
    You contradict yourself
    1) You're not coding bukkit plugin
    2) You're using someone elses code
    3) You have actually learnt java.

    Because it is impossible to write your own bukkit plugins yourself (no plugin maker tools), without knowing java. That is just how it goes.
    Funergy and hintss like this.
  13. Offline


    Sean0402 remember that programming requires you to understand how the things work rather than knowing keywords. In reality most code is made from a quite limited number of "keywords", but you must understand them thoroughly. Try focus more on how Java functions rather than the different types of primitives, for example.
  14. theguynextdoor As I mentioned before I learn from the tutorial from pogostick29dev. Then I went from there and tried to some of my own plugins. Which some worked of course and then some didn't so I was wondering if learning Java before Bukkit API would be better.

    Necrodoom Ok thanks I will keep that in mind.

    Has anyone got any Java tutorials I could possibly learn from? I know there's plenty but I was wondering from you guys because some of them might not be as good as others.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 10, 2016
    PogoStick29 likes this.
  15. Offline


    Until you have a decent understanding of it.
    hintss likes this.
  16. Offline


    I haven't personally watched them, but the general consensus is that thenewboston has some pretty good tutorials. :)

    EDIT: XXLuigiMario
    After decompiling and taking a look at your plugin 'iBlowUp', I can definitely say you would benefit from learning both Java and the Bukkit API a bit more. :)
    es359 and hintss like this.
  17. That was literally my first plugin...
    I now look at it's source code and realize how noob I was, I didn't even know what a "return;" was.

    Ontopic: I in fact did watch some really basic java tutorials.
    hintss likes this.
  18. Offline


    Or you can learn them both as you go if you comprehend things quickly.
    hintss and XXLuigiMario like this.
  19. Offline


    I don't normally blatantly comment on someone's coding, but even in your newer plugins there are very stark and obvious examples of things that you should be doing differently (a recurring theme would be that your onCommand is always a giant if-else tree, rather than branching it into an OOP system for commands allowing for much more future flexibility and maintainability).
    Skye and _LB like this.
  20. Offline


    To add on to what 1Rogue said, you should never need to check the name of the command (or the alias) in the onCommand method.
    hintss likes this.
  21. Offline


    That's much more of a Bukkit API thing than general java knowledge, which is what I was focusing on.
    hintss and _LB like this.
  22. I didn't want to sound like I'm specially good at coding and I do like that people critizises my coding so I can improve it, and what you mentioned is something I'm going to try to implement on my next plugin (not in the one that I last uploaded).
  23. Offline


    Sean0402 things that are helping me learn:

    1. JD-GUI, to check how specific plugins do a specific thing. (Don't one plugin for granted! compare multiple plugins, ask around!)
    2. doxygen. a quick search on the search bar on top-right with an estimate of what you want to do = profit (
    3. try, try, try. If using eclipse, go to the bottom of your plugin folder, in referenced libs, click the bukkit/craftbukkit/spigot/whatever, and take time to scroll through, and glance at what your options are. (in craftbukkit, scroll all the way down to org.bukkit, the rest isn't /usually/ used)
    4. Don't worry about memorizing information. Instead memorize where you can find that information. Don't be afraid to try to find multiple ways of doing one thing. Edison Didn't invent the lightbulb at the first try. :)
    5. The more time and effort you put in, the more you get out of it. :)

    PS: thenewboston is really good, I do enjoy is teaching method.

    XXLuigiMario you give great support on the forums, thank you for that!
    0566 and XXLuigiMario like this.
  24. Offline


    Be careful. He tends to teach bad habits and unconventional things.
  25. Offline


    I never knew 1 bit of Java before learning the Bukkit API. It only took me one day to learn the Bukkit API and create and even upload my first plugin :) But I do have paste code experience with other programming languages.
  26. Offline


    Rocoty Such as? The class names yes, but that is about it.
  27. Offline


    octoshrimpy and XXLuigiMario like this.
  28. 1) Where did I say that?
    2) Read point 1
    3) Watching some basic Java tutorials doesn't mean I've learnt Java.
  29. Offline


Thread Status:
Not open for further replies.

Share This Page