RegistryMutableListValue

class RegistryMutableListValue<T : MutableList<E>, E>(name: String, value: T, innerValueType: ValueType = ValueType.INVALID, innerType: Class<E>) : ListValue<T, E>

Constructors

Link copied to clipboard
constructor(name: String, value: T, innerValueType: ValueType = ValueType.INVALID, innerType: Class<E>)

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

Used to deserialize the value from JSON. TODO: Might replace innerType with a Class variable from the inner value type in the future.

Link copied to clipboard

Used to determine the type of the inner value.

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

This is used to determine the registry endpoint for the API.

Link copied to clipboard

Functions

Link copied to clipboard
fun asStateFlow(): StateFlow<T>
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
override fun deserializeFrom(gson: Gson, element: JsonElement)

Deserialize value from JSON

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun get(): T
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<*>): T

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

Link copied to clipboard
fun immutable(): Value<T>
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
fun onChange(listener: ValueListener<T>): Value<T>
Link copied to clipboard
Link copied to clipboard
open fun restore()

Restore value to default value

Link copied to clipboard
fun set(t: T)
fun set(t: T, apply: ValueChangedListener<T>)
Link copied to clipboard
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: T)
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.