cn.nukkit.form.element.ElementToggle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of powernukkit Show documentation
Show all versions of powernukkit Show documentation
A Minecraft Bedrock Edition server software implementation made in Java from scratch which supports all new features.
package cn.nukkit.form.element;
import com.google.gson.annotations.SerializedName;
public class ElementToggle extends Element {
private final String type = "toggle"; //This variable is used for JSON import operations. Do NOT delete :) -- @Snake1999
private String text;
@SerializedName("default")
private boolean defaultValue;
public ElementToggle(String text) {
this(text, false);
}
public ElementToggle(String text, boolean defaultValue) {
this.text = text;
this.defaultValue = defaultValue;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public boolean isDefaultValue() {
return defaultValue;
}
public void setDefaultValue(boolean defaultValue) {
this.defaultValue = defaultValue;
}
}