com.mythicscape.batclient.interfaces
Interface BatClientPluginTrigger
public interface BatClientPluginTrigger
A plugin that will act as a trigger on incoming text.
- Author:
- ENI
trigger
ParsedResult trigger(ParsedResult input)
- This method is called whenever text is received (a full line) in the client network.
The TriggerManager will call this method on all loaded plugins. The method must return
a ParsedResult as result, which will be forwarded on to the next plugin, script or trigger. So
it is possible to change the output of the text that will be printed to the screen.
If the trigger should not change the result it should return the input
string unmodified. If the trigger has not triggered it should also return the input string
unmodified. If the trigger should gag the text and not send it onwards to other triggers/scripts/plugins
it should return an empty string "". If the trigger has not matched it should return null.
- Parameters:
input
- The result of previous triggers, plugins or scripts on the original text.
- Returns:
- If the trigger did not trigger on the incoming text it should return null. If the
trigger has executed but should not modify the incoming text, the unmodifed input string
should be returned. If the trigger should change the the text, the modified text should
be returned. If the trigger should gag the text and not send it onwards it should return
an empty string "".