Class Module

Direct Known Subclasses:
AbstractInventoryModule, ActionLimiter, ActiveHours, AntiAFK, AntiKick, AntiLeak, AutoArmor, AutoDisconnect, AutoDrop, AutoReconnect, AutoReply, AutoRespawn, ChatHistory, Click, CoordObfuscation, ExtraChat, QueueWarning, ReplayMod, Requeue, SessionTimeLimit, Spammer, SpawnPatrol, Spook, Tasks, VisualRange

public abstract class Module extends ModuleUtils
Module system base class.
  • Constructor Details

    • Module

      public Module()
  • Method Details

    • enabledSetting

      public abstract boolean enabledSetting()
      Whether this module should be enabled automatically on startup Typically, this should be read from a config boolean value
    • registerEvents

      public List<com.github.rfresh2.EventConsumer<?>> registerEvents()
      Override this to register module events
    • registerClientPacketHandlerCodec

      public @Nullable PacketHandlerCodec registerClientPacketHandlerCodec()
      Override this to register client packet handlers Meaning packets between zenith and the destination server
    • registerServerPacketHandlerCodec

      public @Nullable PacketHandlerCodec registerServerPacketHandlerCodec()
      Override this to register server packet handlers Meaning packets between zenith and players - both spectators and controlling player
    • onEnable

      public void onEnable()
      Override to run a custom hook when the module is enabled
    • onDisable

      public void onDisable()
      Override to run a custom hook when the module is disabled
    • enable

      public void enable()
      Enables the module, does not check enabledSetting() or set any config values
    • disable

      public void disable()
      Disables the module, does not check enabledSetting() or set any config values
    • setEnabled

      public void setEnabled(boolean enabled)
      Sets the module enabled state, does not set any config values
    • syncEnabledFromConfig

      public void syncEnabledFromConfig()
      Sets the module enabled state from the result of enabledSetting()
    • subscribeEvents

      public void subscribeEvents()
      Executed when the module is enabled Should not usually be overridden or run directly
    • unsubscribeEvents

      public void unsubscribeEvents()
      Executed when the module is disabled Should not usually be overridden or run directly
    • isEnabled

      public boolean isEnabled()
    • getClientPacketHandlerCodec

      public @Nullable PacketHandlerCodec getClientPacketHandlerCodec()
    • getServerPacketHandlerCodec

      public @Nullable PacketHandlerCodec getServerPacketHandlerCodec()