Interface ModToggle


public interface ModToggle
The master switch shown on a mod's card in OneConfig
A mod gets one by naming an implementation under the "oneconfig:toggle" entrypoint of its fabric.mod.json. The class is only loaded when OneConfig is installed, so this can be a compileOnly dependency
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    default boolean
    Whether the mod has to be set up before it can be switched on
    Switching such a mod on opens it from its card instead, the same as clicking the card does
    void
    setEnabled(boolean enabled)
     
  • Field Details

  • Method Details

    • isEnabled

      boolean isEnabled()
    • setEnabled

      void setEnabled(boolean enabled)
    • needsSetup

      default boolean needsSetup()
      Whether the mod has to be set up before it can be switched on
      Switching such a mod on opens it from its card instead, the same as clicking the card does