Class ToggleableModule

java.lang.Object
org.rusherhack.client.api.feature.module.Module
org.rusherhack.client.api.feature.module.ToggleableModule
All Implemented Interfaces:
IModule, Globals, org.rusherhack.core.bind.IBindable, org.rusherhack.core.event.listener.EventListener, org.rusherhack.core.feature.IFeature, org.rusherhack.core.feature.IFeatureConfigurable, org.rusherhack.core.interfaces.IHideable, org.rusherhack.core.interfaces.INamed, org.rusherhack.core.interfaces.IToggleable, org.rusherhack.core.logging.ILoggable, org.rusherhack.core.notification.INotifiable, org.rusherhack.core.serialize.ISerializable<com.google.gson.JsonElement>, org.rusherhack.core.serialize.JsonSerializable

public abstract class ToggleableModule extends Module implements org.rusherhack.core.interfaces.IToggleable, org.rusherhack.core.bind.IBindable
A module that can be toggled
  • Constructor Details

  • Method Details

    • toggle

      public void toggle()
      Specified by:
      toggle in interface org.rusherhack.core.interfaces.IToggleable
    • isToggled

      public boolean isToggled()
      Specified by:
      isToggled in interface org.rusherhack.core.interfaces.IToggleable
    • setToggled

      public void setToggled(boolean toggled)
      Specified by:
      setToggled in interface org.rusherhack.core.interfaces.IToggleable
    • onEnable

      public void onEnable()
      Called when the module is enabled.

      Avoid referencing the world or player here, because modules can be toggled while they are null.

      Specified by:
      onEnable in interface org.rusherhack.core.interfaces.IToggleable
    • onDisable

      public void onDisable()
      Called when the module is disabled.

      Avoid referencing the world or player here, because modules can be toggled while they are null.

      Specified by:
      onDisable in interface org.rusherhack.core.interfaces.IToggleable
    • onKeybindEvent

      public void onKeybindEvent()
      Specified by:
      onKeybindEvent in interface org.rusherhack.core.bind.IBindable
    • getBindReference

      public String getBindReference()
      Specified by:
      getBindReference in interface org.rusherhack.core.bind.IBindable
    • isListening

      public boolean isListening()
      Specified by:
      isListening in interface org.rusherhack.core.event.listener.EventListener
      Overrides:
      isListening in class Module
    • serialize

      public com.google.gson.JsonElement serialize()
      Specified by:
      serialize in interface org.rusherhack.core.serialize.ISerializable<com.google.gson.JsonElement>
      Overrides:
      serialize in class Module
    • deserialize

      public boolean deserialize(com.google.gson.JsonElement jsonElement)
      Specified by:
      deserialize in interface org.rusherhack.core.serialize.ISerializable<com.google.gson.JsonElement>
      Overrides:
      deserialize in class Module