public class JavaPlugin extends Object implements Plugin1
Constructor and Description |
---|
JavaPlugin() |
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.
|
public int getInterfaceVersion()
Plugin1
getInterfaceVersion
in interface Plugin1
public String getName()
Plugin1
public String[] getCommands()
Plugin1
getCommands
in interface Plugin1
public void run(Command command) throws SincerityException
Plugin1
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
.
run
in interface Plugin1
command
- The command to runSincerityException
- In case of an errorpublic void gui(Command command) throws SincerityException
Plugin1
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.
gui
in interface Plugin1
command
- The command used to invoke the GUI (likely "shell:gui")SincerityException
- In case of an errorCopyright © 2011-2016 Three Crickets LLC.