commander-api/API Overview

Commander API Overview

The new Commander Script Engine is a complex beast, and we* figured that it might be helpful to other plugin developers to be able to use the Scripting API, in one way or another.

Because of this, we have decided to make the API available on multiple levels!

  • The EV Module - An EVM, or Environment Variable Module, is a way for your plugin to provide values to running Commander scripts! Users will be able to access your values via a call to the "plugin.<YourPluginName>" namespace in the environment variables. This method can be used in conjunction with the other two methods.
  • The Opaque API - If you want access to commander scripts but don't want to deal with all the nitty-gritty with running them, then this is for you! We provide a few methods through the CommanderAPI class for you to get scripts which you can simply call the execute function on without having to deal with details like exceptions and setting variables correctly.
  • The CommanderEngine - If you want to use the Commander Scripting Engine in your plugin, as a replacement for Commander running on its own, then this is probably what you want. As of 2.0, Commander's Engine is now separate from its plugin class and can be used without enabling the plugin (with all its event registrations and such). From there, you can pick and choose how you want to handle things like file parsing, or let Commander do that! (We highly recommend letting the engine do script parsing, but replacement file parsing can be yours.)

Each of these methods has its own page, so go check them out!

*Note: All uses of the word "we" are in the "royal" form.


Comments

Posts Quoted:
Reply
Clear All Quotes