Implementation

Implementation

Lectures

Implementation | Create a countdown | How listeners work

First of all

  1. Download the latest version of the CountdownAPI.
  2. Extract the zip file.
  3. Put the CountdownAPI.jar into your plugin folder.
  4. Put the folder called doc wherever you want, but remember where it is.

Preperations in Eclipse

Note: If you already have a project please skip the first 2 steps.

  1. Create a Project
  2. Add the craftbukkit.jar to your project.
  3. Add the CountdownAPI.jar to your project. It works the same as in step 2.
  4. Expand the Referenced Libraries and right click on CountdownAPI.jar. From there go to Build Path -> Configure Build Path. Select Javadoc location: (None) and press the Edit-Button on the right. Now browse to the doc-folder you previously extracted and select it. Press Validate to check it everything works. Then confirm by pressing OK two times. If it doesn't work contact me via PMs and I'll try to help you.

How to implent the CountdownAPI in your plugin!

Code

Instead of using

extends JavaPlugin

use

extends CountdownPlugin
plugin.yml

Don't forget to add the dependency of the CountdownAPI

How to I do that?

add:

  • depend: [Countdown] (for Version 1.2)
  • depend: [CountdownAPI] (for Version 1.2.1 and higher)