Package com.gmt2001.module
Class Module
java.lang.Object
com.gmt2001.module.Module
- Direct Known Subclasses:
CoreModule
A bot module written in Java
- Author:
- gmt2001
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidExecutes after all models have been loadedbooleanIndicates the default enabled state of the module on a new installationfinal booleanIndicates if this module is currently enabledbooleanonCommandEvent(CommandEvent event) ReceivesCommandEventvoidExecutes when the module state changes to disabledbooleanReceivesDiscordChannelCommandEventvoidonEnable()Executes when the module state changes to enabledvoidvoidReceivesIrcModerationEventvoidonLoad()Executes immediately after loading this module
-
Constructor Details
-
Module
public Module()
-
-
Method Details
-
onLoad
public void onLoad()Executes immediately after loading this module -
afterLoad
public void afterLoad()Executes after all models have been loaded -
defaultEnabledState
public boolean defaultEnabledState()Indicates the default enabled state of the module on a new installation- Returns:
trueif the module should be enabled
-
isEnabled
public final boolean isEnabled()Indicates if this module is currently enabled- Returns:
trueif enabled
-
onEnable
public void onEnable()Executes when the module state changes to enabledAlso executes after
afterLoad()if the initialization state of the module is enabled -
onDisable
public void onDisable()Executes when the module state changes to disabledAlso executes after
afterLoad()if the initialization state of the module is disabled -
onEvent
- Parameters:
event- the event data
-
onIRCModerationEvent
ReceivesIrcModerationEvent- Parameters:
event- the event data
-
onCommandEvent
ReceivesCommandEventIf
falseis returned, command cost/reward are undone- Parameters:
event- the event data- Returns:
trueif the command was handled successfully
-
onDiscordChannelCommandEvent
ReceivesDiscordChannelCommandEventIf
falseis returned, command cost/reward are undone- Parameters:
event- the event data- Returns:
trueif the command was handled successfully
-