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 Summary
ConstructorsConstructorDescriptionActionSetting(net.minecraft.network.chat.Component name, Supplier<net.minecraft.network.chat.Component> value, Runnable action) -
Method Summary
-
Constructor Details
-
ActionSetting
-
-
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:
namein interfacecom.viaversion.viafabricplus.api.settings.base.Setting
-
write
public void write(com.google.gson.JsonObject object) - Specified by:
writein interfacecom.viaversion.viafabricplus.api.settings.base.Setting
-
read
public void read(com.google.gson.JsonObject object) - Specified by:
readin interfacecom.viaversion.viafabricplus.api.settings.base.Setting
-