public class ConfigElement extends java.lang.Object implements IConfigElement
| Constructor and Description |
|---|
ConfigElement(ConfigCategory category) |
ConfigElement(Property prop) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
get()
[Property] Gets this property value.
|
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.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.
|
java.lang.Object |
getMaxValue()
[Property] Gets this property's maximum value.
|
java.lang.Object |
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) |
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.
|
java.lang.String[] |
getValidValuesDisplay()
[Property] Gets a String array of the versions of this property's valid values that will display in the config GUI.
|
boolean |
hasSlidingControl() |
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 |
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(java.lang.Object value)
[Property] Sets this property's value.
|
void |
set(java.lang.Object[] 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.
|
public ConfigElement(ConfigCategory category)
public ConfigElement(Property prop)
public ConfigElement listCategoriesFirst(boolean categoriesFirst)
public java.util.List<IConfigElement> getChildElements()
IConfigElementgetChildElements in interface IConfigElementpublic java.lang.String getName()
IConfigElementgetName in interface IConfigElementpublic boolean isProperty()
IConfigElementisProperty in interface IConfigElementpublic java.lang.String getQualifiedName()
IConfigElementgetQualifiedName in interface IConfigElementpublic ConfigGuiType getType()
IConfigElementgetType in interface IConfigElementpublic static ConfigGuiType getType(Property prop)
public boolean isList()
IConfigElementisList in interface IConfigElementpublic boolean isListLengthFixed()
IConfigElementisListLengthFixed in interface IConfigElementpublic int getMaxListLength()
IConfigElementgetMaxListLength in interface IConfigElementpublic java.lang.String getComment()
IConfigElementgetComment in interface IConfigElementpublic boolean isDefault()
IConfigElementisDefault in interface IConfigElementpublic void setToDefault()
IConfigElementsetToDefault in interface IConfigElementpublic boolean requiresWorldRestart()
IConfigElementrequiresWorldRestart in interface IConfigElementpublic boolean showInGui()
IConfigElementshowInGui in interface IConfigElementpublic boolean requiresMcRestart()
IConfigElementrequiresMcRestart in interface IConfigElementpublic java.lang.String[] getValidValues()
IConfigElementgetValidValues in interface IConfigElementpublic java.lang.String[] getValidValuesDisplay()
IConfigElementgetValidValuesDisplay in interface IConfigElementpublic java.lang.String getLanguageKey()
IConfigElementgetLanguageKey in interface IConfigElementpublic java.lang.Object getDefault()
IConfigElementgetDefault in interface IConfigElementpublic java.lang.Object[] getDefaults()
IConfigElementgetDefaults in interface IConfigElementpublic java.util.regex.Pattern getValidationPattern()
IConfigElementgetValidationPattern in interface IConfigElementpublic boolean hasSlidingControl()
hasSlidingControl in interface IConfigElementpublic java.lang.Object get()
IConfigElementget in interface IConfigElementpublic java.lang.Object[] getList()
IConfigElementgetList in interface IConfigElementpublic void set(java.lang.Object value)
IConfigElementset in interface IConfigElementpublic void set(java.lang.Object[] aVal)
IConfigElementset in interface IConfigElementpublic java.lang.Object getMinValue()
IConfigElementgetMinValue in interface IConfigElementpublic java.lang.Object getMaxValue()
IConfigElementgetMaxValue in interface IConfigElement