Starting a plugin

Discussion in 'Plugin Development' started by BTJ1, Oct 25, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    BTJ1

    Sorry, as this is a rather nooby question, but what do I need to start a bukkit plugin? I've worked with other languages before, but I just want to make sure I have everything before I begin. So far I have netbeans 7, jdk 7, and bukkit 1.8.8. I saw some threads talking about maven, do I need that?
     
    Last edited by a moderator: Oct 25, 2016
  2. Offline

    mythbusterma

    @BTJ1

    You don't need maven. All you have to do is create a new project and add Bukkit as a library, then start creating your plugin.

    The Bukkit plugin tutorial details this better than I will.

    http://wiki.bukkit.org/Plugin_Tutorial
     
  3. Offline

    BTJ1

    The tutorial says it needs maven, what does maven do? Also, is JDK 7 right?
     
  4. @BTJ1
    Maven is a way of managing the compiling of your project, but when you are a beginner it just tends to over-complicate things. I'd recommend using the built in option in your IDE.

    Also, JDK 7 does work when making bukkit plugins, although you won't have access to some nice Java 8 features like lambda expressions and streams unless you use JDK 8.
     
  5. @BTJ1 honestly its better Eclipse or IntelliJ and u dont need anything of that
     
  6. Offline

    PhantomUnicorns

    @danichef Netbeans is up there with Eclipse and Intellij.
    @BTJ1 You need to download a modified version of minecraft, then add that to your build path. Once you do that, all you need to do is implement some default stuff the bukkit API requires for it to work.
     
  7. Offline

    mythbusterma

    @danichef

    I'm not sure what you're trying to say, but NetBeans is in fact inferior to both.

    @PhantomUnicorns

    A modified version of Minecraft? On your build path? What?

    All you need is the Bukkit API. Then you're done. I'm really not sure what you're on about.

    @BTJ1

    No, you don't need Maven, just skip that portion and download the Bukkit API yourself and add that to the build path of your project. Just start by creating a normal project instead.

    As for Java 7 or 8, it doesn't really matter as long as it matches the system you're going to be running it on.
     
  8. Offline

    PhantomUnicorns

  9. Offline

    mythbusterma

    @PhantomUnicorns

    No? It's an API for a Minecraft server. CraftBukkit is a modified version of the Minecraft server, but you don't need CraftBukkit to make a plugin.


    Bukkit is just a collection of interfaces.
     
  10. Offline

    PhantomUnicorns

    Yes you do as if you don't reference CraftBukkit there is no way to put anything to the console (bukkit blocks it) change anything of the players, or anything. And when I said minecraft, I was talking about a minecraft server (it obviously isn't the minecraft that you would use to connect to a server, I thought that was implied sorry for the misconception)
     
  11. Offline

    timtower Administrator Administrator Moderator

    @PhantomUnicorns Bukkit is just a collection of libraries.
    We are talking about building the plugin.
    Not running the plugin.
     
  12. Offline

    PhantomUnicorns

    I know, to build the plugin you require to reference craftbukkit (or bukkit) in your build path.
     
  13. Offline

    mythbusterma

    @PhantomUnicorns

    You should be using Bukkit, is the point we were trying to make here. You're very much off base here. Bukkit is a standardised interface for working with a modified Minecraft server, implemented by PaperSpigot, Spigot, and CraftBukkit, among others.

    The Bukkit jarfile isn't a runnable jar, so it doesn't "block" anything, per se.
     
  14. Offline

    PhantomUnicorns

    Maybe we are just confused on what the other thinks... whatever I say you seem to pretty much say the same thing but in detail, I meant craftbukkit when mentioned blocks. If you try to trace anything craftbukkit blocks it i.e: System.out.print("This will not print");
     
  15. Offline

    mythbusterma

    @PhantomUnicorns

    As far as I know, CraftBukkit doesn't "block" anything. If I recall correctly, it doesn't redirect standard out, but you should never rely on it not redirecting standard out, as the Bukkit API says that it may, and provides configurable loggers for to use in the form of Log4J.

    Like I said, I don't know what you're saying.
     
  16. Offline

    Tecno_Wizard

    @mythbusterma it actually does reformat the output of the print statement to match the rest of Bukkit's log, but it will work. I use it all the time for debugging that is removed before I release anything.

    @PhantomUnicorns We honestly have no idea what you are talking about. Quick rundown of Bukkit vs CraftBukkit vs Spigot

    Bukkit- Bukkit is a library of APIs including Bukkit itself, snakeYML, junit, gson, json.simple, and others used to build plugins that work with a modified Minecraft server that implements Bukkit. It alone is NOT a Minecraft server and is used to build plugins that are platform independent. (It will run on any supported version of a Bukkit implementing server, as long as the version of Bukkit used to build the plugin is new enough).

    CraftBukkit- a modded Minecraft server that uses the Bukkit plugin interface. While it implements Bukkit is is NOT Bukkit and should not be used as such. Plugins built on the Bukkit API will run if put into the plugins folder of the server directory. While it implements Bukkit, it is NOT Bukkit and should not be used as such. Plugins compiled using Spigot or different minor or major versions of CraftBukkit may not work correctly or at all (think NMS-like behavior).

    Spigot- a modded Minecraft server that uses the Bukkit plugin interface as well as a couple of others I know nothing about. Plugins built on the Bukkit API will run of put into the plugins folder of the server directory. Plugins built using Craftbukkit or different major or minor versions of Spigot may not work correctly or may not work at all (think NMS-like behavior).
     
    I Al Istannen likes this.
  17. Offline

    BTJ1

    I'm sadly using a windows XP to do this, so that's why I'm using netbeans 7. Could you put a link to an archived version of Eclipse or IntelliJ for XP?
     
  18. @BTJ1
    Well, @danichef is wrong, Netbeans is just as capable as intellij and eclipse.
     
  19. Offline

    BTJ1

    @AlvinB
    I'd like to try out a few other IDE's, I've only really used netbeans, so it would be nice to use some others that are recommended for bukkit.
     
  20. Offline

    MaxFireIce

    @BTJ1 Listen to me very closely. Search up plugin dev tutorials on youtube. The peeps i learned from are TheBCBroz. There are plenty of things out there to start learning plugin development. Use your resources.
     
  21. Offline

    RenditionsRule

    @MaxFireIce
    "TheBCBroz"... And that's your mistake.
     
    Zombie_Striker likes this.
  22. Offline

    MaxFireIce

  23. Offline

    Zombie_Striker

    @MaxFireIce
    He is terrible and should never be recommended. If you need a youtube channel (which most people don't, it's always better to read books/tutorials instead of watching videos), choose someone like PogoStickDev.
     
    bwfcwalshy and RenditionsRule like this.
  24. Offline

    RenditionsRule

    @MaxFireIce
    I would personally recommend PogoStick29Dev if you had to choose anyone, but take the time to understand what he's doing, and what each line does.
     
    Zombie_Striker likes this.
  25. Offline

    MaxFireIce

    @RenditionsRule @Zombie_Striker alright, ill have to check him out then. I originally used TheBCBroz when i was first beginning with just java knowledge. I used his new tutorials as documentation just as a kick starter and now just use this site as documentation nowadays. Still learning though.
     
  26. Offline

    RenditionsRule

    @MaxFireIce
    I'd recommend the javadocs if you were looking for proper documentation.
     
  27. Offline

    MaxFireIce

    @RenditionsRule where are those? they arent in the craftbukkit.jar where they would be most useful.
     
  28. Offline

    RenditionsRule

    @MaxFireIce
    jd.bukkit.org? I don't know if there's a more updated one for bukkit, as I usually check the spigot one.
     
  29. Offline

    MaxFireIce

Thread Status:
Not open for further replies.

Share This Page