Differences between CraftBukkit and Bukkit

Discussion in 'Plugin Development' started by Nogtail, Jul 11, 2014.

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


    I guess this is probably the best part of the forum for my question, none of the others seemed to have anything to do with what I'm asking.

    Firstly before I start, I know that Bukkit is the API part and CraftBukkit is the actual runnable implementation of that. When looking through the source some things that I would have thought were in the API part like the scheduler were actually in CraftBukkit, is there a clear rule that defines what part a file goes in?
  2. Offline


    I would like to know this too :p
  3. Nogtail MCMastery Essentialy, think of it as CraftBukkit is Bukkit + stuff, where stuff is what is needed to actually make the server run (since Bukkit alone does essentially nothing, as it is an interface)

    Because CraftBukkit has the things a server needs to run, you'll need it on your build path if you want to use Nasty Minecraft Stuff code (NMS - others seem to think this stands for net.minecraft.server, but it's obviously Nasty Minecraft Stuff, right?), but you generally shouldn't use CraftBukkit as the sole dependency. Off the top of my head, a good reason that a lot of beginners discover is because of the whole "ambiguous health" situation thing, which wouldn't occur building against Bukkit. :)
    MCMastery likes this.
  4. Offline


    Pretty much, only difference is that Bukkit has some classes as interfaces instead. I recommend using CraftBukkit. I have never run into an issue as using it as my dependency and I have made a TON of plugins. Using Bukkit is "better" but it doesn't make too much of a difference unless you were making a gigantic plugin like Essentials or Factions etc
  5. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    Bukkit is what you should be building against when writing a plugin. There are several methods that, if used by your plugin, will cause your plugin to fail to compile when building against CraftBukkit.

    Building against CB is very much a "For very advanced users only" idea. It contains the internal server classes that 99% of users need not be touching. Yet, it'll happily confuse newbies in your IDE when it suggests using them.

    EnderTroll68 MCMastery Nogtail
  6. Offline


    AdamQpzm mbaxter I can't think of why the scheduler implementation would be in CB then as it only seems to be used by plugins?
  7. Offline


    I would like to see proof on that due to the fact that CraftBukkit has utilities that are not blocked by version barriers, which I do work with quite often. Small plugins which do not require these utilities provided should stick to using Bukkit, however larger ones I would recommend CB. Do not get me wrong when I say that you should use Bukkit as a first dependency no matter what however, depending on how you're using CB I would say its fine.
  8. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    The implementation needs to be in CB because it relies on ticks, which are part of the implementation ;)

    This is just giving plugin devs thinking "I'm going to make the best big plugin ever!" the idea to pointlessly build against CB and then get confused when they can't build with ambiguous getHealth or getOnlinePlayers ;)
    Nogtail likes this.
  9. Offline


  10. Offline


    mbaxter While we are on the topic of the scheduler and you appear to know at least something about it, could you explain why some form of custom linked list is used instead of a linked list from the collections framework?
  11. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    I would assume because it met the requirements better. ;)
Thread Status:
Not open for further replies.

Share This Page