public class ScriptableConfig
extends java.lang.Object
| Constructor and Description |
|---|
ScriptableConfig(cubex2.cs2core.Mod mod) |
| 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.
|
int |
getBlockIdFrom(java.lang.String configFile,
java.lang.String name)
Gets the value of a block id property from the given configuration file
|
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.
|
boolean |
getBooleanFrom(java.lang.String configFile,
java.lang.String name)
Gets the value of a boolean property from the given config file.
|
boolean |
getBooleanFrom(java.lang.String configFile,
java.lang.String name,
java.lang.String category)
Gets the value of a boolean property in the given category from the given config file
|
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 |
getIntFrom(java.lang.String configFile,
java.lang.String name)
Gets the value of a int property from the given config file.
|
int |
getIntFrom(java.lang.String configFile,
java.lang.String name,
java.lang.String category)
Gets the value of a int property in the given category from the given config file
|
int |
getItemId(java.lang.String name)
Gets the value of a item id property in the given category.
|
int |
getItemIdFrom(java.lang.String configFile,
java.lang.String name)
Gets the value of a item id property from the given configuration file
|
java.lang.String |
getString(java.lang.String name)
Gets the value of a string property.
|
java.lang.String |
getString(java.lang.String name,
java.lang.String category)
Gets the value of a string property in the given category.
|
java.lang.String |
getStringFrom(java.lang.String configFile,
java.lang.String name)
Gets the value of a string property from the given config file.
|
java.lang.String |
getStringFrom(java.lang.String configFile,
java.lang.String name,
java.lang.String category)
Gets the value of a string property in the given category from the given config file
|
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 property. No capitals.defaultValue - 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 property. No capitals.defaultValue - 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 property. No capitals.defaultValue - 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 property. No capitals.defaultValue - 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 property. No capitals.defaultValue - 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 property. No capitals.defaultValue - 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 getBlockIdFrom(java.lang.String configFile,
java.lang.String name)
throws java.lang.Exception
configFile - The config filename - 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 int getItemIdFrom(java.lang.String configFile,
java.lang.String name)
throws java.lang.Exception
configFile - The config filename - 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 property. No capitals.java.lang.Exceptionpublic boolean getBooleanFrom(java.lang.String configFile,
java.lang.String name)
throws java.lang.Exception
configFile - The config filename - The name of the propertyjava.lang.Exceptionpublic boolean getBooleanFrom(java.lang.String configFile,
java.lang.String name,
java.lang.String category)
throws java.lang.Exception
configFile - The config filename - The name of the propertycategory - The category of the property. No capitals.java.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 property. No capitals.java.lang.Exceptionpublic int getIntFrom(java.lang.String configFile,
java.lang.String name)
throws java.lang.Exception
configFile - The config filename - The name of the propertyjava.lang.Exceptionpublic int getIntFrom(java.lang.String configFile,
java.lang.String name,
java.lang.String category)
throws java.lang.Exception
configFile - The config filename - The name of the propertycategory - The category of the property. No capitals.java.lang.Exceptionpublic java.lang.String getString(java.lang.String name)
throws java.lang.Exception
name - The name of the propertyjava.lang.Exceptionpublic java.lang.String getString(java.lang.String name,
java.lang.String category)
throws java.lang.Exception
name - The name of the propertycategory - The category of the property. No capitals.java.lang.Exceptionpublic java.lang.String getStringFrom(java.lang.String configFile,
java.lang.String name)
throws java.lang.Exception
configFile - The config filename - The name of the propertyjava.lang.Exceptionpublic java.lang.String getStringFrom(java.lang.String configFile,
java.lang.String name,
java.lang.String category)
throws java.lang.Exception
configFile - The config filename - The name of the propertycategory - The category of the property. No capitals.java.lang.Exception