All pages
Powered by GitBook
1 of 1

Switch option

An example of what the switch looks like in-game, toggled both on and off.

Example

@Switch(
    title = "My Switch",
    description = "This is my switch", // Recommended, default = ""
    icon = "/my_switch.svg", // Optional, default = ""
    category = "Switches", // Recommended, default = "General"
    subcategory = "General" // Recommended, default = "General"
)
public static boolean mySwitch = false;
var mySwitch: Boolean by switch(
    name = "My Switch",
    def = false, // Sets option's default value. Recommended, default = true
    description = "This is my switch", // Recommended, default = ""
    icon = "/my_switch.svg", // Optional, default = ""
    category = "Switches", // Recommended, default = "General"
    subcategory = "General" // Recommended, default = "General"
)