Class Module<C extends ModuleConfig>
java.lang.Object
net.lynxclient.api.module.Module<C>
- Direct Known Subclasses:
HudWidget
A feature with its own switch and settings – LynxClient's built-in features and addons are both modules.
While enabled, the module is registered on the event bus, so
@Subscribe methods only run when it is on.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Categorycategory()final Cconfig()final voiddispatchEnabled(boolean enabled) Called by LynxClient – not for addons.final Stringid()Stable id, also the translation prefix and the config file namefinal booleanbooleanisSettingVisible(String key) false hides a setting in the menu, e.g.booleanfalse for modules that are always on (e.g.protected voidAfter the module was switched off.protected voidonEnable()After the module was switched on (also at start-up when it is on).
-
Constructor Details
-
Module
-
-
Method Details
-
id
Stable id, also the translation prefix and the config file name -
category
-
config
-
isEnabled
public final boolean isEnabled() -
isToggleable
public boolean isToggleable()false for modules that are always on (e.g. general settings) – the menu shows no switch for them -
isSettingVisible
false hides a setting in the menu, e.g. one that does not exist on this Minecraft version -
onEnable
protected void onEnable()After the module was switched on (also at start-up when it is on). -
onDisable
protected void onDisable()After the module was switched off. -
dispatchEnabled
public final void dispatchEnabled(boolean enabled) Called by LynxClient – not for addons.
-