Setting Up Your Workspace
This page will go through some of the tools that you will need to use to work with Bukkit and building Bukkit plugins.
There is some developer choice when it comes to what you use to build your software, however there are some key tools ever developer needs. Even if you only want to make plugins, there are some tools that will make your job easier, and if you to go open source, easier for everyone who helps you!
Java Development Kit
A JDK (Java Development Kit) is required to compile Java for use in the JRE (Java Runtime Environment). The latest version of the JDK is available from the Oracle Technology Network.
Which version of the JDK?
There are multiple versions of Java, and consequently, multiple versions of the JDK. Both Bukkit and Minecraft are compiled for Java 5. Most Bukkit servers are running Java 6, but a few run Java 7. Generally, newer versions of the JDK can target older Java versions, however, by default they target their own version. Programs and plugins compiled with a new version of Java are not compatible with older versions of the JRE, attempting to run such a plugin results in a UnsupportedClassVersionError. In practice, it is common to use the JDK version that corresponds with your runtime environment.
64-bit or 32-bit?
Unless your computer is not capable of running 64-bit software, you should use a 64-bit JDK. The rest of the development environment will need to match the version of the JDK you have installed. On 64-bit systems it is possible to have both 64-bit and 32-bit JDKs installed at the same time.
is a distributed version control system. The Bukkit Project manages all its code through Git. Git allows the lone developer to keep track of their work and different developers to collaborate on work, tracking all changes that were made and by whom. It is very powerful, and consequently can be a little difficult to use sometimes. The latest version of git can be found on here on the git-scm site.
Detailed instructions for installing and using git can be found in the Pro Git book on git-scm.
Sharing of code works both ways - you can download shared code, but you can also share yours with the world. This is a great idea in this open community, as it allows others to help you with your project, or even develop new features for your plugins! If you intend to contribute to the Bukkit Project you must be willing to share your code. Additional instructions for using GitHub can be found at GitHub:Help
Additional instructions for installing and using Maven can be found here on the maven site.
Once installed Maven, it can build Bukkit, CraftBukkit or any of the other Bukkit projects. As mentioned in the README for both Bukkit and CraftBukkit, they can be compiled by simply running 'mvn install'.
Integrated Development Environments
The IDE (Intergraded Development Environment) is a program you can use to compile and debug your plugins. An IDE is optional piece of the developer tool chain. It is possible to use notepad (or its equivalent) and produce a working a plugin. An IDE however, makes the life of a developer by integrating powerful tools, providing syntax highlighting, and error checking. The choice of which IDE to use is yours to make!
The Eclipse IDE is a popular choice among plugin developers. The latest version, Eclipse Juno (4.2) SR2, can be found here on the eclipse site. Plugin developers should download the Eclipse IDE for Java Developers. Eclipse provides Maven integration by means of the m2Eclipse plugin, Git integration with by mean of the eGit plugin. Additionally, the YEdit plugin can be installed to provide a YAML editor.
- For general Eclipse IDE usage please refer to the Eclipse documentaiton.
- For Maven integration usage please refer to the m2eclipse documentation.
- For Git integration usage please refer to the eGit documentaiton.
The Netbeans IDE is developed by Oracle. The latest version, 7.3, can be found here on the Netbeans site. Plugin developers should download the Netbeans Java SE bundle. Netbeans provides native integration with Maven and Git integration by means of a Git plugin.
- For usage instructions please refer to the Netbeans documentation.
The IntelliJ IDEA is another popular IDE. The latest version, 12, can be found here on the IntelliJ site. Plugin developers should download the Community Edition. IntelliJ provides native integration with Maven and Git.
- For usage instructions please refer to the IntelliJ documentation.
Where To From Here
There is lots more involved in actually developing and testing your code, however hopefully you now have the tools to get started. If you find any particularly useful tutorials make sure to link them here!
It is suggested that you start with Plugin Tutorial.
|Language||English • Беларускі • Deutsch • Español • Suomi • Français • Italiano • 한국어 • Nederlands • Norsk (bokmål) • Polski • Português • Русский|