Class ActionSetting

java.lang.Object
com.viaversion.viafabricplus.bedrock.settings.ActionSetting
All Implemented Interfaces:
com.viaversion.viafabricplus.api.settings.base.Setting

public final class ActionSetting extends Object implements com.viaversion.viafabricplus.api.settings.base.Setting
Setting which runs an action when clicked. Has no value of its own and therefore nothing to persist.
  • Constructor Details

    • ActionSetting

      public ActionSetting(net.minecraft.network.chat.Component name, Supplier<net.minecraft.network.chat.Component> value, Runnable action)
  • Method Details

    • value

      public net.minecraft.network.chat.Component value()
      Returns:
      the text shown on the right side of the entry, usually the current state of the action
    • run

      public void run()
    • name

      public net.minecraft.network.chat.Component name()
      Specified by:
      name in interface com.viaversion.viafabricplus.api.settings.base.Setting
    • write

      public void write(com.google.gson.JsonObject object)
      Specified by:
      write in interface com.viaversion.viafabricplus.api.settings.base.Setting
    • read

      public void read(com.google.gson.JsonObject object)
      Specified by:
      read in interface com.viaversion.viafabricplus.api.settings.base.Setting