net.minecraft.src.forge
Class Configuration

java.lang.Object
  extended by net.minecraft.src.forge.Configuration

public class Configuration
extends java.lang.Object

This class offers advanced configurations capabilities, allowing to provide various categories for configuration variables.


Nested Class Summary
static class Configuration.Property
           
static class Configuration.PropertyKind
           
 
Field Summary
 java.util.TreeMap<java.lang.String,Configuration.Property> blockProperties
           
 java.util.TreeMap<java.lang.String,Configuration.Property> generalProperties
           
 java.util.TreeMap<java.lang.String,Configuration.Property> itemProperties
           
 
Constructor Summary
Configuration(java.io.File file)
          Create a configuration file for the file given in parameter.
 
Method Summary
 Configuration.Property getOrCreateBlockIdProperty(java.lang.String key, int defaultId)
          Gets or create a block id property.
 Configuration.Property getOrCreateBooleanProperty(java.lang.String key, Configuration.PropertyKind kind, boolean defaultValue)
           
 Configuration.Property getOrCreateIntProperty(java.lang.String key, Configuration.PropertyKind kind, int defaultValue)
           
 Configuration.Property getOrCreateProperty(java.lang.String key, Configuration.PropertyKind kind, java.lang.String defaultValue)
           
 void load()
           
 void save()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blockProperties

public java.util.TreeMap<java.lang.String,Configuration.Property> blockProperties

itemProperties

public java.util.TreeMap<java.lang.String,Configuration.Property> itemProperties

generalProperties

public java.util.TreeMap<java.lang.String,Configuration.Property> generalProperties
Constructor Detail

Configuration

public Configuration(java.io.File file)
Create a configuration file for the file given in parameter.

Method Detail

getOrCreateBlockIdProperty

public Configuration.Property getOrCreateBlockIdProperty(java.lang.String key,
                                                         int defaultId)
Gets or create a block id property. If the block id property key is already in the configuration, then it will be used. Otherwise, defaultId will be used, except if already taken, in which case this will try to determine a free default id.


getOrCreateIntProperty

public Configuration.Property getOrCreateIntProperty(java.lang.String key,
                                                     Configuration.PropertyKind kind,
                                                     int defaultValue)

getOrCreateBooleanProperty

public Configuration.Property getOrCreateBooleanProperty(java.lang.String key,
                                                         Configuration.PropertyKind kind,
                                                         boolean defaultValue)

getOrCreateProperty

public Configuration.Property getOrCreateProperty(java.lang.String key,
                                                  Configuration.PropertyKind kind,
                                                  java.lang.String defaultValue)

load

public void load()

save

public void save()