Interface EditSlot<T>
public interface EditSlot<T>
What a
ValueEditor edits: a config value, or an element of a list being edited. Values set here are
pending until the player saves.-
Method Summary
Modifier and TypeMethodDescriptionOptional<net.minecraft.network.chat.Component> error()Why the current input can't be saved, if it can't.get()The pending value.net.minecraft.network.chat.Componentname()The name to narrate.voidSets a new pending value; it's checked, and the slot reports anerror()when it isn't valid.voidsetInvalid(net.minecraft.network.chat.Component error) Marks input that isn't a value at all (text that doesn't parse), which blocks saving until it's fixed.type()
-
Method Details
-
type
ConfigType<T> type() -
get
T get()The pending value. -
set
-
setInvalid
void setInvalid(net.minecraft.network.chat.Component error) Marks input that isn't a value at all (text that doesn't parse), which blocks saving until it's fixed. -
error
Optional<net.minecraft.network.chat.Component> error()Why the current input can't be saved, if it can't. -
name
net.minecraft.network.chat.Component name()The name to narrate.
-