Search in sources :

Example 1 with DefaultConfig

use of org.spongepowered.api.config.DefaultConfig in project ClearMob by axle2005.

the class ClearMob method preInitialization.

@Listener
public void preInitialization(GamePreInitializationEvent event) {
    config = new Config(this, defaultConfig, configManager);
    events = new ListenersRegister(this);
    w = new Warning();
    listEntityType = Util.getEntityType(config.getList("ClearingLists,EntityList"));
    listTileEntityType = Util.getTileEntityType(config.getList("Clearing,Lists,TileEntityList"));
    listItemType = Util.getItemType(config.getList("Clearing,Lists,ItemList"));
    itemWB = config.getNodeString("Clearing,KillDrops,ListType");
    configoptions[0] = config.getNodeBoolean("Clearing,PassiveMode");
    configoptions[1] = config.getNodeBoolean("Clearing,KillAllMonsters");
    configoptions[2] = config.getNodeBoolean("Clearing,KillDrops,Enabled");
    configoptions[3] = config.getNodeBoolean("Clearing,KillAnimalGroups");
    configoptions[4] = config.getNodeBoolean("Warning,Enabled");
    configoptions[5] = config.getNodeBoolean("Clearing,CrashMode");
    configoptions[6] = config.getNodeBoolean("Clearing,MobLimiter,Enabled");
    interval = config.getNodeInt("Clearing,Interval");
    moblimit = config.getNodeInt("Clearing,MobLimiter,Limit");
    warningmessage = config.getNodeString("Warning,Messages,Warning");
    clearedmessage = config.getNodeString("Warning,Messages,Cleared");
}
Also used : DefaultConfig(org.spongepowered.api.config.DefaultConfig) ListenersRegister(io.github.axle2005.clearmob.listeners.ListenersRegister) Listener(org.spongepowered.api.event.Listener)

Aggregations

ListenersRegister (io.github.axle2005.clearmob.listeners.ListenersRegister)1 DefaultConfig (org.spongepowered.api.config.DefaultConfig)1 Listener (org.spongepowered.api.event.Listener)1