Denizen API

From Citizens Wiki

Revision as of 17:31, 2 July 2012 by Aufdemrand (talk | contribs) (Created page with "In Denizen, the Script Command system is extensible by design. It's very easy to make your own commands (and soon Requirements) extend the built-in features. On top of that, D...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In Denizen, the Script Command system is extensible by design. It's very easy to make your own commands (and soon Requirements) extend the built-in features. On top of that, Denizen has some features available that may be of use to Plugin Developers.

Building your own Script Commands

The ScriptCommand Object

When Denizen reads scripts, each line is turned into a SciptCommand object that contains the command, the arguments, and various other data and objects, as described below. Your command is basically an extension of this base ScriptCommand class, and each time your command is called in for execution, it's this class that is run.

Barebones ScriptCommand Class

The following is a Hello World example of a ScriptCommand.