public interface Plugin1
Command
).
In order to allow for future upgrades to the plugin interface, while still allowing support for older plugin implementation, this interface has a version suffix.
This is version 1 of the plugin interface.
Note that although this is a Java language interface, a robust mechanism is
in place to allow you to delegate the interface to non-Java languages running
in the JVM, using the Scripturian library. See DelegatedPlugin
for
more information.
Plugins
Modifier and Type | Method and Description |
---|---|
String[] |
getCommands()
The command names supported by this plugin.
|
int |
getInterfaceVersion()
The version of the Sincerity plugin interface supported by this plugin.
|
String |
getName()
The name of this plugin.
|
void |
gui(Command command)
Called by the
ShellPlugin to allow this plugin to activate its
own extension to the GUI. |
void |
run(Command command)
Runs a command.
|
int getInterfaceVersion() throws SincerityException
SincerityException
- In case of an errorString getName() throws SincerityException
SincerityException
- In case of an errorString[] getCommands() throws SincerityException
SincerityException
- In case of an errorvoid run(Command command) throws SincerityException
If the command is not supported by this plugin, should throw a
UnknownCommandException
. If the command does not have the
arguments it needs in order to run, should throw a
BadArgumentsCommandException
. Other command-specific failures
should throw a CommandException
.
command
- The command to runSincerityException
- In case of an errorvoid gui(Command command) throws SincerityException
ShellPlugin
to allow this plugin to activate its
own extension to the GUI. This is an optional operation.
The Frame
can be accessed at Sincerity.getFrame()
. Note
that when this hook is called, the frame is not yet made visible.
command
- The command used to invoke the GUI (likely "shell:gui")SincerityException
- In case of an errorCopyright © 2011-2016 Three Crickets LLC.