Adding a command to plugin.yml
Create a new Bukkit plugin as you did in Chapter 3, Creating Your First Bukkit Plugin, but name it Enchanter
. Alternatively, you can create a copy of your existing project and modify the name, package, and so on in order to create a new plugin. This will eliminate the need to add the required libraries and configure the build script. A project can be copied by performing the following steps:
- Right-click on the project that you wish to copy and select Copy… from the menu.
- Set the project name. The project location should remain unchanged.
- Open
build.xml
, as discussed in Chapter 4, Testing on the Spigot Server, and change the project's name to match what was set in step 2. - Update the package in your new project so that it is unique by right-clicking on the package and selecting Rename… in the Refactor menu item.
- Rename the main class, if necessary. You can also remove the methods or classes that you know will not be reused.
- Finally, modify the...