public abstract class AbstractCustomTriggerManager extends AbstractTriggerManager<CustomTrigger>
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractCustomTriggerManager.EventHook |
static interface |
AbstractCustomTriggerManager.EventRegistry |
AbstractTriggerManager.TriggerFilter, AbstractTriggerManager.TriggerInitFailedException| Modifier and Type | Field and Description |
|---|---|
protected AbstractCustomTriggerManager.EventRegistry |
registry |
configSourceFactory, folder, loader| Constructor and Description |
|---|
AbstractCustomTriggerManager(TriggerReactorCore plugin,
File folder,
AbstractCustomTriggerManager.EventRegistry registry) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createCustomTrigger(String eventName,
String name,
String script)
Create a new CustomTrigger.
|
abstract Collection<String> |
getAbbreviations() |
protected abstract void |
registerEvent(TriggerReactorCore plugin,
Class<?> clazz,
AbstractCustomTriggerManager.EventHook eventHook)
Hook event to handle it manually.
|
void |
reload()
Reload all triggers
|
CustomTrigger |
remove(String name) |
protected abstract void |
unregisterEvent(TriggerReactorCore plugin,
AbstractCustomTriggerManager.EventHook eventHook) |
get, getAllTriggers, getFolder, getTriggerFile, getTriggerInfos, getTriggerList, has, put, reload, reportWarnings, saveAlldisable, getManagersprotected final AbstractCustomTriggerManager.EventRegistry registry
public AbstractCustomTriggerManager(TriggerReactorCore plugin, File folder, AbstractCustomTriggerManager.EventRegistry registry)
public void reload()
Managerreload in class AbstractTriggerManager<CustomTrigger>protected abstract void registerEvent(TriggerReactorCore plugin, Class<?> clazz, AbstractCustomTriggerManager.EventHook eventHook)
plugin - clazz - eventHook - protected abstract void unregisterEvent(TriggerReactorCore plugin, AbstractCustomTriggerManager.EventHook eventHook)
public abstract Collection<String> getAbbreviations()
public boolean createCustomTrigger(String eventName, String name, String script) throws ClassNotFoundException, AbstractTriggerManager.TriggerInitFailedException
eventName - the class name of the Event that this Custom Trigger will
handle.name - name of trigger (unique)script - the scriptClassNotFoundException - throws if className is not in abbreviation list, not a valid
class name, or the specified event is not a valid event to
handle.ParserExceptionLexerExceptionIOExceptionAbstractTriggerManager.TriggerInitFailedExceptionpublic CustomTrigger remove(String name)
remove in class AbstractTriggerManager<CustomTrigger>