public class ScriptableConfig
extends cubex2.mods.customstuff2.engine.ScriptObject
| Constructor and Description |
|---|
ScriptableConfig(cubex2.mods.customstuff2.engine.Mod mod,
org.mozilla.javascript.ScriptableObject scope) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBlockIdProperty(java.lang.String name,
int defaultValue)
Adds a block id property to the config file.
|
void |
addBlockIdProperty(java.lang.String name,
int defaultValue,
java.lang.String comment)
Adds a block id property to the config file.
|
void |
addBooleanProperty(java.lang.String name,
boolean defaultValue)
Adds a boolean property to the config file.
|
void |
addBooleanProperty(java.lang.String name,
boolean defaultValue,
java.lang.String comment)
Adds a boolean property to the config file.
|
void |
addBooleanProperty(java.lang.String name,
java.lang.String category,
boolean defaultValue)
Adds a boolean property in the given category to the config file.
|
void |
addBooleanProperty(java.lang.String name,
java.lang.String category,
boolean defaultValue,
java.lang.String comment)
Adds a boolean property with a comment in the given category to the config
file.
|
void |
addIntProperty(java.lang.String name,
int defaultValue)
Adds a int property to the config file.
|
void |
addIntProperty(java.lang.String name,
int defaultValue,
java.lang.String comment)
Adds a int property to the config file.
|
void |
addIntProperty(java.lang.String name,
java.lang.String category,
int defaultValue)
Adds a int property in the given category to the config file.
|
void |
addIntProperty(java.lang.String name,
java.lang.String category,
int defaultValue,
java.lang.String comment)
Adds a int property with a comment in the given category to the config
file.
|
void |
addItemIdProperty(java.lang.String name,
int defaultValue)
Adds an item id property to the config file.
|
void |
addItemIdProperty(java.lang.String name,
int defaultValue,
java.lang.String comment)
Adds an item id property to the config file.
|
void |
addStringProperty(java.lang.String name,
java.lang.String defaultValue)
Adds a string property to the config file.
|
void |
addStringProperty(java.lang.String name,
java.lang.String category,
java.lang.String defaultValue)
Adds a string property in the given category to the config file.
|
void |
addStringProperty(java.lang.String name,
java.lang.String category,
java.lang.String defaultValue,
java.lang.String comment)
Adds a string property with a comment in the given category to the config
file.
|
int |
getBlockId(java.lang.String name)
Gets the value of a block id property in the given category.
|
boolean |
getBoolean(java.lang.String name)
Gets the value of a boolean property.
|
boolean |
getBoolean(java.lang.String name,
java.lang.String category)
Gets the value of a boolean property in the given category.
|
int |
getInt(java.lang.String name)
Gets the value of a int property.
|
int |
getInt(java.lang.String name,
java.lang.String category)
Gets the value of a int property in the given category.
|
int |
getItemId(java.lang.String name)
Gets the value of a item id property in the given category.
|
int |
getString(java.lang.String name)
Gets the value of a string property.
|
int |
getString(java.lang.String name,
java.lang.String category)
Gets the value of a string property in the given category.
|
public ScriptableConfig(cubex2.mods.customstuff2.engine.Mod mod,
org.mozilla.javascript.ScriptableObject scope)
public void addBlockIdProperty(java.lang.String name,
int defaultValue)
name - The name of the propertydefaultValue - The default valuepublic void addBlockIdProperty(java.lang.String name,
int defaultValue,
java.lang.String comment)
name - The name of the propertydefaultValue - The default valuecomment - The comment for the propertypublic void addItemIdProperty(java.lang.String name,
int defaultValue)
name - The name of the propertydefaultValue - The default valuepublic void addItemIdProperty(java.lang.String name,
int defaultValue,
java.lang.String comment)
name - The name of the propertydefaultValue - The default valuecomment - The comment for the propertypublic void addBooleanProperty(java.lang.String name,
boolean defaultValue)
name - The name of the propertydefaultValue - The default valuepublic void addBooleanProperty(java.lang.String name,
java.lang.String category,
boolean defaultValue)
name - The name of the propertycategory - The category of the propertydefaultValue - The default valuepublic void addBooleanProperty(java.lang.String name,
boolean defaultValue,
java.lang.String comment)
name - The name of the propertydefaultValue - The default valuecomment - The comment for the propertypublic void addBooleanProperty(java.lang.String name,
java.lang.String category,
boolean defaultValue,
java.lang.String comment)
name - The name of the propertycategory - The category of the propertydefaultValue - The default valuecomment - The comment for the propertypublic void addIntProperty(java.lang.String name,
int defaultValue)
name - The name of the propertydefaultValue - The default valuepublic void addIntProperty(java.lang.String name,
java.lang.String category,
int defaultValue)
name - The name of the propertycategory - The category of the propertydefaultValue - The default valuepublic void addIntProperty(java.lang.String name,
int defaultValue,
java.lang.String comment)
name - The name of the propertydefaultValue - The default valuecomment - The comment for the propertypublic void addIntProperty(java.lang.String name,
java.lang.String category,
int defaultValue,
java.lang.String comment)
name - The name of the propertycategory - The category of the propertydefaultValue - The default valuecomment - The comment for the propertypublic void addStringProperty(java.lang.String name,
java.lang.String defaultValue)
name - The name of the propertydefaultValue - The default valuepublic void addStringProperty(java.lang.String name,
java.lang.String category,
java.lang.String defaultValue)
name - The name of the propertycategory - The category of the propertydefaultValue - The default valuepublic void addStringProperty(java.lang.String name,
java.lang.String category,
java.lang.String defaultValue,
java.lang.String comment)
name - The name of the propertycategory - The category of the propertydefaultValue - The default valuecomment - The comment for the propertypublic int getBlockId(java.lang.String name)
throws java.lang.Exception
name - The name of the propertyjava.lang.Exceptionpublic int getItemId(java.lang.String name)
throws java.lang.Exception
name - The name of the propertyjava.lang.Exceptionpublic boolean getBoolean(java.lang.String name)
throws java.lang.Exception
name - The name of the propertyjava.lang.Exceptionpublic boolean getBoolean(java.lang.String name,
java.lang.String category)
throws java.lang.Exception
name - The name of the propertycategory - The category of the propertyjava.lang.Exceptionpublic int getInt(java.lang.String name)
throws java.lang.Exception
name - The name of the propertyjava.lang.Exceptionpublic int getInt(java.lang.String name,
java.lang.String category)
throws java.lang.Exception
name - The name of the propertycategory - The category of the propertyjava.lang.Exceptionpublic int getString(java.lang.String name)
throws java.lang.Exception
name - The name of the propertyjava.lang.Exceptionpublic int getString(java.lang.String name,
java.lang.String category)
throws java.lang.Exception
name - The name of the propertycategory - The category of the propertyjava.lang.Exception