com.mythicscape.batclient.interfaces
Class BatClientPlugin

java.lang.Object
  extended by com.mythicscape.batclient.interfaces.BatClientPlugin

public abstract class BatClientPlugin
extends java.lang.Object

BatClientPlugin interface.

Author:
ENI

Constructor Summary
BatClientPlugin()
           
 
Method Summary
 java.lang.String getBaseDirectory()
           
 ClientGUI getClientGUI()
           
 Global getGlobal()
           
 MacroManager getMacroManager()
           
abstract  java.lang.String getName()
           
 Net getNet()
           
 PluginManager getPluginManager()
          Get the PluginManager for adding protocol listeners or add plugins etc.
 java.lang.String getRawString(java.text.AttributedString input)
          Gets the raw string that represents the attributed string.
 TriggerManager getTriggerManager()
           
 void init(PluginManager pluginManager, Global global, MacroManager macroManager, Net net, TriggerManager triggerManager, ClientGUI clientGUI)
          Initializes the plugin with the objects it should have access to from the client.
abstract  void loadPlugin()
          Method that is called right when the plugin is loaded.
 void process(java.lang.Object data)
          Plugins can be called from within the client through scripts of directly from the commandline as a script would be called ($myscript).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatClientPlugin

public BatClientPlugin()
Method Detail

init

public void init(PluginManager pluginManager,
                 Global global,
                 MacroManager macroManager,
                 Net net,
                 TriggerManager triggerManager,
                 ClientGUI clientGUI)
Initializes the plugin with the objects it should have access to from the client. This is done right after the plugin has been created, before loadPlugin is called on it. Generally this method should never be used! It is only used by the client itself when it loads the plugins.

Parameters:
global -
macroManager -
net -
triggerManager -
clientGUI -

getBaseDirectory

public java.lang.String getBaseDirectory()

getRawString

public java.lang.String getRawString(java.text.AttributedString input)
Gets the raw string that represents the attributed string. The raw string does not include any color or client protocol codes.

Parameters:
input -
Returns:

getGlobal

public Global getGlobal()

getMacroManager

public MacroManager getMacroManager()

getNet

public Net getNet()

getTriggerManager

public TriggerManager getTriggerManager()

getClientGUI

public ClientGUI getClientGUI()

getPluginManager

public PluginManager getPluginManager()
Get the PluginManager for adding protocol listeners or add plugins etc.

Returns:

process

public void process(java.lang.Object data)
Plugins can be called from within the client through scripts of directly from the commandline as a script would be called ($myscript). The plugin is called through the PluginManager which is available inside scripts, plugins or through the commandline with the $ character. If a plugin has the same name as a script, both will be called. If a plugin should be processed when called this method should be overriden by subclasses.

If the plugin is called from the commandline the "data" object will be an Arraylist with type strings for the vars that has been given at the commandline.

Parameters:
data - The data to send to the plugin.

loadPlugin

public abstract void loadPlugin()
Method that is called right when the plugin is loaded. Plugins are loaded after the client has startup but before connecting to the server or logging in any player.


getName

public abstract java.lang.String getName()