public class DummyConfigElement extends java.lang.Object implements IConfigElement
| Modifier and Type | Class and Description |
|---|---|
static class |
DummyConfigElement.DummyCategoryElement
This class provides a Dummy Category IConfigElement.
|
static class |
DummyConfigElement.DummyListElement
This class provides a dummy array-type IConfigElement.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class<? extends GuiEditArrayEntries.IArrayEntry> |
arrayEntryClass |
protected java.util.List<IConfigElement> |
childElements |
protected java.lang.Class<? extends GuiConfigEntries.IConfigEntry> |
configEntryClass |
protected java.lang.Object |
defaultValue |
protected java.lang.Object[] |
defaultValues |
protected boolean |
isList |
protected boolean |
isListFixedLength |
protected boolean |
isProperty |
protected java.lang.String |
langKey |
protected int |
maxListLength |
protected java.lang.Object |
maxValue |
protected java.lang.Object |
minValue |
protected java.lang.String |
name |
protected boolean |
requiresMcRestart |
protected boolean |
requiresWorldRestart |
protected ConfigGuiType |
type |
protected java.util.regex.Pattern |
validStringPattern |
protected java.lang.String[] |
validValues |
protected java.lang.Object |
value |
protected java.lang.Object[] |
values |
| Constructor and Description |
|---|
DummyConfigElement(java.lang.String name,
java.lang.Object defaultValue,
ConfigGuiType type,
java.lang.String langKey) |
DummyConfigElement(java.lang.String name,
java.lang.Object defaultValue,
ConfigGuiType type,
java.lang.String langKey,
java.lang.Object minValue,
java.lang.Object maxValue) |
DummyConfigElement(java.lang.String name,
java.lang.Object defaultValue,
ConfigGuiType type,
java.lang.String langKey,
java.util.regex.Pattern validStringPattern) |
DummyConfigElement(java.lang.String name,
java.lang.Object defaultValue,
ConfigGuiType type,
java.lang.String langKey,
java.lang.String[] validValues) |
DummyConfigElement(java.lang.String name,
java.lang.Object defaultValue,
ConfigGuiType type,
java.lang.String langKey,
java.lang.String[] validValues,
java.util.regex.Pattern validStringPattern,
java.lang.Object minValue,
java.lang.Object maxValue) |
| 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
GuiEditArrayEntries.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
GuiConfigEntries.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.
|
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.
|
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?
|
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.
|
IConfigElement |
setArrayEntryClass(java.lang.Class<? extends GuiEditArrayEntries.IArrayEntry> clazz) |
IConfigElement |
setConfigEntryClass(java.lang.Class<? extends GuiConfigEntries.IConfigEntry> clazz) |
DummyConfigElement |
setCustomListEntryClass(java.lang.Class<? extends GuiConfigEntries.IConfigEntry> clazz) |
IConfigElement |
setRequiresMcRestart(boolean requiresMcRestart) |
IConfigElement |
setRequiresWorldRestart(boolean requiresWorldRestart) |
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.
|
protected boolean isProperty
protected boolean isList
protected ConfigGuiType type
protected java.lang.String name
protected java.lang.String langKey
protected java.lang.Object value
protected java.lang.Object defaultValue
protected java.lang.Object[] values
protected java.lang.Object[] defaultValues
protected java.lang.String[] validValues
protected java.util.regex.Pattern validStringPattern
protected java.lang.Object minValue
protected java.lang.Object maxValue
protected boolean requiresWorldRestart
protected boolean requiresMcRestart
protected boolean isListFixedLength
protected int maxListLength
protected java.util.List<IConfigElement> childElements
protected java.lang.Class<? extends GuiConfigEntries.IConfigEntry> configEntryClass
protected java.lang.Class<? extends GuiEditArrayEntries.IArrayEntry> arrayEntryClass
public DummyConfigElement(java.lang.String name,
java.lang.Object defaultValue,
ConfigGuiType type,
java.lang.String langKey,
java.lang.String[] validValues,
java.util.regex.Pattern validStringPattern,
java.lang.Object minValue,
java.lang.Object maxValue)
public DummyConfigElement(java.lang.String name,
java.lang.Object defaultValue,
ConfigGuiType type,
java.lang.String langKey,
java.util.regex.Pattern validStringPattern)
public DummyConfigElement(java.lang.String name,
java.lang.Object defaultValue,
ConfigGuiType type,
java.lang.String langKey,
java.lang.String[] validValues)
public DummyConfigElement(java.lang.String name,
java.lang.Object defaultValue,
ConfigGuiType type,
java.lang.String langKey)
public DummyConfigElement(java.lang.String name,
java.lang.Object defaultValue,
ConfigGuiType type,
java.lang.String langKey,
java.lang.Object minValue,
java.lang.Object maxValue)
public DummyConfigElement setCustomListEntryClass(java.lang.Class<? extends GuiConfigEntries.IConfigEntry> clazz)
public boolean isProperty()
IConfigElementisProperty in interface IConfigElementpublic IConfigElement setConfigEntryClass(java.lang.Class<? extends GuiConfigEntries.IConfigEntry> clazz)
public java.lang.Class<? extends GuiConfigEntries.IConfigEntry> getConfigEntryClass()
IConfigElementGuiConfigEntries.IConfigEntry or null. This class MUST
provide a constructor with the following parameter types: GuiConfig, GuiConfigEntries, IConfigElementgetConfigEntryClass in interface IConfigElementGuiConfigEntries.ListEntryBase,
GuiConfigEntries.StringEntry,
GuiConfigEntries.BooleanEntry,
GuiConfigEntries.DoubleEntry,
GuiConfigEntries.IntegerEntrypublic IConfigElement setArrayEntryClass(java.lang.Class<? extends GuiEditArrayEntries.IArrayEntry> clazz)
public java.lang.Class<? extends GuiEditArrayEntries.IArrayEntry> getArrayEntryClass()
IConfigElementGuiEditArrayEntries.IArrayEntry. This class MUST provide a constructor with the
following parameter types: GuiEditArray, GuiEditArrayEntries, IConfigElement, ObjectgetArrayEntryClass in interface IConfigElementGuiEditArrayEntries.BaseEntry,
GuiEditArrayEntries.StringEntry,
GuiEditArrayEntries.BooleanEntry,
GuiEditArrayEntries.DoubleEntry,
GuiEditArrayEntries.IntegerEntrypublic java.lang.String getName()
IConfigElementgetName in interface IConfigElementpublic java.lang.String getQualifiedName()
IConfigElementgetQualifiedName in interface IConfigElementpublic java.lang.String getLanguageKey()
IConfigElementgetLanguageKey in interface IConfigElementpublic java.lang.String getComment()
IConfigElementgetComment in interface IConfigElementpublic java.util.List<IConfigElement> getChildElements()
IConfigElementgetChildElements in interface IConfigElementpublic ConfigGuiType getType()
IConfigElementgetType in interface IConfigElementpublic boolean isList()
IConfigElementisList in interface IConfigElementpublic boolean isListLengthFixed()
IConfigElementisListLengthFixed in interface IConfigElementpublic int getMaxListLength()
IConfigElementgetMaxListLength in interface IConfigElementpublic boolean isDefault()
IConfigElementisDefault in interface IConfigElementpublic java.lang.Object getDefault()
IConfigElementgetDefault in interface IConfigElementpublic java.lang.Object[] getDefaults()
IConfigElementgetDefaults in interface IConfigElementpublic void setToDefault()
IConfigElementsetToDefault in interface IConfigElementpublic IConfigElement setRequiresWorldRestart(boolean requiresWorldRestart)
public boolean requiresWorldRestart()
IConfigElementrequiresWorldRestart in interface IConfigElementpublic boolean showInGui()
IConfigElementshowInGui in interface IConfigElementpublic IConfigElement setRequiresMcRestart(boolean requiresMcRestart)
public boolean requiresMcRestart()
IConfigElementrequiresMcRestart in interface IConfigElementpublic java.lang.String[] getValidValues()
IConfigElementgetValidValues in interface IConfigElementpublic java.util.regex.Pattern getValidationPattern()
IConfigElementgetValidationPattern 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