BindValue

class BindValue(name: String, aliases: List<String> = emptyList(), defaultValue: InputBind) : Value<InputBind>

Constructors

Link copied to clipboard
constructor(name: String, aliases: List<String> = emptyList(), defaultValue: InputBind)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

If true, value will not be included in generated public config. Can be set using doNotIncludeWhen or doNotIncludeAlways.

Link copied to clipboard

Group for optional inclusion during configuration saving. Managed by AutoConfig.

Link copied to clipboard
Link copied to clipboard

If true, value will always keep inner equals defaultValue.

Link copied to clipboard
var key: String?
Link copied to clipboard
@SerializedName(value = "name")
val name: String
Link copied to clipboard

If true, value will not be included in generated RestAPI config.

Link copied to clipboard

Functions

Link copied to clipboard
fun asStateFlow(): StateFlow<InputBind>
Link copied to clipboard

Binds to the given input name.

fun Value<InputBind>.bind(key: InputConstants.Key, action: InputBind.BindAction, modifiers: Set<InputBind.Modifier>)

Binds to the given input type and code.

Link copied to clipboard

Checks if this value should be included in the public configuration based on its doNotInclude condition and inclusionGroup.

Link copied to clipboard
open fun deserializeFrom(gson: Gson, element: JsonElement)

Deserialize value from JSON

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun get(): InputBind
Link copied to clipboard
@JvmName(name = "getTagValue")
fun getTagValue(): Any
Link copied to clipboard
@JvmName(name = "getValue")
fun getValue(): Any

operator fun getValue(u: Any?, property: KProperty<*>): InputBind

Support for delegated properties example: var autoaim by boolean(name = "autoaim", default = true) if(!autoaim) autoaim = true

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T : Any, R> Value<T>.mapReadOnly(transform: (T) -> R): ReadOnlyProperty<Any?, R>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun restore()

Restore value to default value

Link copied to clipboard
Link copied to clipboard
open override fun setByString(string: String)
Link copied to clipboard
@JvmName(name = "setValue")
fun setValue(t: Value): Result<Unit>
operator fun setValue(u: Any?, property: KProperty<*>, t: InputBind)
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
Link copied to clipboard

Unbinds the key by setting it to UNKNOWN_KEY.