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 TypeMethodDescriptionvoid
Executes after all models have been loadedboolean
Indicates the default enabled state of the module on a new installationfinal boolean
Indicates if this module is currently enabledboolean
onCommandEvent
(CommandEvent event) ReceivesCommandEvent
void
Executes when the module state changes to disabledboolean
ReceivesDiscordChannelCommandEvent
void
onEnable()
Executes when the module state changes to enabledvoid
void
ReceivesIrcModerationEvent
void
onLoad()
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:
true
if the module should be enabled
-
isEnabled
public final boolean isEnabled()Indicates if this module is currently enabled- Returns:
true
if 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
ReceivesCommandEvent
If
false
is returned, command cost/reward are undone- Parameters:
event
- the event data- Returns:
true
if the command was handled successfully
-
onDiscordChannelCommandEvent
ReceivesDiscordChannelCommandEvent
If
false
is returned, command cost/reward are undone- Parameters:
event
- the event data- Returns:
true
if the command was handled successfully
-