Need help, noob at making plugins

Discussion in 'Spigot Plugin Development' started by BoonMeneer, May 11, 2015.

  1. I would like making Bukkit (spigot) plugins, i learned Java a little bit.
    Then I decided to learn making Minecraft plugins, I found this website:

    I wanted to learn the org.bukkit.block, but I don't know how to use these docs, examples are welcome :D
  2. Start by determining what you want to create, that ought to help :p
    • Agree Agree x 2
  3. The java docs are just there so you can look at how to utilize the class' functions.

    A simple plugin you could make is a block re-placer. So the plugin basically consists of one listener and that's it. The listener will utilize PlayerInteractEvent, and through that you will get the block that the player clicked and then you can use the java docs to see all the different functions you can use in the block class. You can remove the block, replace it, make it explode, turn it into a chicken. The possibilities are endless.

    Good luck and happy coding!
    • Funny Funny x 1
    • Like Like x 1
  4. Yeah, reading JavaDocs when you're new to Java and haven't used any APIs before is a bit difficult. I started by just reading up on tutorials and eventually I started to understand what everything in JavaDocs meant. The underlying issue was my lack of knowledge in how OO projects are structured.

    I'll try to help you out here. You don't just read over all the classes in the org.bukkit.block package and you're ready to start manipulating blocks. You have to somehow obtain instances of those classes. For example, you can obtain an org.bukkit.block.Block from various events. From there, you are able to manipulate that block. That's where the JavaDocs come in-- you can read over all the methods and such so you can get an idea of what you can do with the instance you have.
    • Like Like x 2
    • Agree Agree x 1
  5. I don't know how to use these docs, already saw them, can you give me an example, please?
  6. IDK, something simple, maybe you can send me some examples of a simple code, so i can look if I understand it, I just watched a: Learning java I now know what the "if" and "else" statements are.
  7. You might want to look more into Java instead of starting with Spigot plugins. There's a tonne of other keywords and a lot of utility classes which you will need, let alone studying object oriented programming.

    For tutorials, I recommend checking the oracle Java tutorials.
    • Agree Agree x 1
  8. I am following this series already: