Adding Bukkit as a library
Now that we have created our main class, we need to add the Bukkit API as the library for our project. As we can recall from the previous chapter, the API includes the code that we can access to modify the CraftBukkit server. It is available for download at http://dl.bukkit.org/downloads/bukkit/. Again, choose the version that matches your client version and the version of CraftBukkit that you downloaded. Once you have downloaded the file, you will have to move it to a permanent location. I suggest you create a folder named Libraries
in which to place it. The filename will most likely have a version appended to it. Similar to what we did for craftbukkit.jar
, we will rename this file; this helps us to easily update it in the future. So the new location of your bukkit jar
will be C:\Users\Owner\Documents\NetBeansProjects\Libraries\bukkit.jar
. Remember your file location, because now that we have downloaded the Bukkit API we can create a library for it in NetBeans...