public class ConfigElement<T> extends java.lang.Object implements IConfigElement<T>
Type | Property and Description |
---|---|
boolean |
is
[Property, Category] Is this object a property object?
|
Constructor and Description |
---|
ConfigElement(ConfigCategory ctgy) |
ConfigElement(Property prop) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get()
[Property] Gets this property value.
|
java.lang.Class<? extends GuiEditArrayEntries.IArrayEntry> |
getArrayEntryClass()
This method returns a class that implements
IArrayEntry . |
java.util.List<IConfigElement> |
getChildElements()
[Category] Gets this category's child categories/properties.
|
java.lang.String |
getComment()
[Property, Category] Gets the comment for this object.
|
java.lang.Class<? extends GuiConfigEntries.IConfigEntry> |
getConfigEntryClass()
This method returns a class that implements
IConfigEntry or null. |
java.lang.Object |
getDefault()
[Property] Gets this property's default value.
|
java.lang.Object[] |
getDefaults()
[Property] Gets this property's default values.
|
java.lang.String |
getLanguageKey()
[Property, Category] Gets a language key for localization of config GUI entry names.
|
java.lang.Object[] |
getList()
[Property] Gets this property value as a list.
|
int |
getMaxListLength()
[Property] Gets the max length of this list property, or -1 if the length is unlimited.
|
T |
getMaxValue()
[Property] Gets this property's maximum value.
|
T |
getMinValue()
[Property] Gets this property's minimum value.
|
java.lang.String |
getName()
[Property, Category] Gets the name of this object.
|
java.lang.String |
getQualifiedName()
[Category] Gets the qualified name of this object.
|
ConfigGuiType |
getType()
[Property, Category] Gets the ConfigGuiType value corresponding to the type of this property object, or CONFIG_CATEGORY if this is a
category object.
|
static ConfigGuiType |
getType(Property prop) |
static ConfigElement<?> |
getTypedElement(Property prop) |
java.util.regex.Pattern |
getValidationPattern()
[Property] Gets a Pattern object used in String property input validation.
|
java.lang.String[] |
getValidValues()
[Property] Gets a String array of valid values for this property.
|
boolean |
isDefault()
[Property] Is this property value equal to the default value?
|
boolean |
isList()
[Property] Is this property object a list?
|
boolean |
isListLengthFixed()
[Property] Does this list property have to remain a fixed length?
|
boolean |
isProperty()
[Property, Category] Is this object a property object?
|
ConfigElement<T> |
listCategoriesFirst(boolean categoriesFirst) |
boolean |
requiresMcRestart()
[Property, Category] Whether or not this element requires Minecraft to be restarted when changed.
|
boolean |
requiresWorldRestart()
[Property, Category] Whether or not this element is safe to modify while a world is running.
|
void |
set(T value)
[Property] Sets this property's value.
|
void |
set(T[] aVal)
[Property] Sets this property's value to the specified array.
|
void |
setToDefault()
[Property] Sets this property's value to the default value.
|
boolean |
showInGui()
[Property, Category] Whether or not this element should be allowed to show on config GUIs.
|
isProperty
in interface IConfigElement<T>
public ConfigElement(ConfigCategory ctgy)
public ConfigElement(Property prop)
public ConfigElement<T> listCategoriesFirst(boolean categoriesFirst)
public java.util.List<IConfigElement> getChildElements()
IConfigElement
getChildElements
in interface IConfigElement<T>
public static ConfigElement<?> getTypedElement(Property prop)
public java.lang.String getName()
IConfigElement
getName
in interface IConfigElement<T>
public boolean isProperty()
IConfigElement
isProperty
in interface IConfigElement<T>
public java.lang.Class<? extends GuiConfigEntries.IConfigEntry> getConfigEntryClass()
IConfigElement
IConfigEntry
or null. This class MUST
provide a constructor with the following parameter types: GuiConfig
, GuiConfigEntries
, IConfigElement
getConfigEntryClass
in interface IConfigElement<T>
public java.lang.Class<? extends GuiEditArrayEntries.IArrayEntry> getArrayEntryClass()
IConfigElement
IArrayEntry
. This class MUST provide a constructor with the
following parameter types: GuiEditArray
, GuiEditArrayEntries
, IConfigElement
, Object
getArrayEntryClass
in interface IConfigElement<T>
public java.lang.String getQualifiedName()
IConfigElement
getQualifiedName
in interface IConfigElement<T>
public ConfigGuiType getType()
IConfigElement
getType
in interface IConfigElement<T>
public static ConfigGuiType getType(Property prop)
public boolean isList()
IConfigElement
isList
in interface IConfigElement<T>
public boolean isListLengthFixed()
IConfigElement
isListLengthFixed
in interface IConfigElement<T>
public int getMaxListLength()
IConfigElement
getMaxListLength
in interface IConfigElement<T>
public java.lang.String getComment()
IConfigElement
getComment
in interface IConfigElement<T>
public boolean isDefault()
IConfigElement
isDefault
in interface IConfigElement<T>
public void setToDefault()
IConfigElement
setToDefault
in interface IConfigElement<T>
public boolean requiresWorldRestart()
IConfigElement
requiresWorldRestart
in interface IConfigElement<T>
public boolean showInGui()
IConfigElement
showInGui
in interface IConfigElement<T>
public boolean requiresMcRestart()
IConfigElement
requiresMcRestart
in interface IConfigElement<T>
public java.lang.String[] getValidValues()
IConfigElement
getValidValues
in interface IConfigElement<T>
public java.lang.String getLanguageKey()
IConfigElement
getLanguageKey
in interface IConfigElement<T>
public java.lang.Object getDefault()
IConfigElement
getDefault
in interface IConfigElement<T>
public java.lang.Object[] getDefaults()
IConfigElement
getDefaults
in interface IConfigElement<T>
public java.util.regex.Pattern getValidationPattern()
IConfigElement
getValidationPattern
in interface IConfigElement<T>
public java.lang.Object get()
IConfigElement
get
in interface IConfigElement<T>
public java.lang.Object[] getList()
IConfigElement
getList
in interface IConfigElement<T>
public void set(T value)
IConfigElement
set
in interface IConfigElement<T>
public void set(T[] aVal)
IConfigElement
set
in interface IConfigElement<T>
public T getMinValue()
IConfigElement
getMinValue
in interface IConfigElement<T>
public T getMaxValue()
IConfigElement
getMaxValue
in interface IConfigElement<T>