mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 17:05:59 +00:00
Dome, Panel Settings
This commit is contained in:
1 parent
14545818bd
commit
f620e820e8
16 files changed
+752
-146
No files matched your search
@@ -0,0 +1,37 @@
|
||||
package noppes.npcs.config;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class ConfigEnergy {
|
||||
public static Configuration config;
|
||||
|
||||
public final static String DOMES = "Domes";
|
||||
|
||||
public static String[] DomeItemBlacklist;
|
||||
|
||||
public static void init(File configFile) {
|
||||
config = new Configuration(configFile);
|
||||
|
||||
try {
|
||||
config.load();
|
||||
|
||||
DomeItemBlacklist = config.getStringList(
|
||||
"Item Blacklist", DOMES,
|
||||
new String[]{"minecraft:ender_pearl"},
|
||||
"Items that cannot be used while inside an Energy Dome.\n"
|
||||
+ "Format: modid:itemname (e.g., minecraft:ender_pearl)"
|
||||
);
|
||||
|
||||
} catch (Exception e) {
|
||||
FMLLog.log(Level.ERROR, e, "CustomNPC+ has had a problem loading its energy configuration");
|
||||
} finally {
|
||||
if (config.hasChanged()) {
|
||||
config.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ public class LoadConfiguration {
|
||||
public static File clientConfigFile;
|
||||
public static File experimentalConfigFile;
|
||||
public static File marketConfigFile;
|
||||
public static File energyConfigFile;
|
||||
|
||||
public static void init(String configpath) {
|
||||
mainConfigFile = new File(configpath + "main.cfg");
|
||||
@@ -19,6 +20,7 @@ public class LoadConfiguration {
|
||||
debugConfigFile = new File(configpath + "debug.cfg");
|
||||
experimentalConfigFile = new File(configpath + "experimental.cfg");
|
||||
marketConfigFile = new File(configpath + "market.cfg");
|
||||
energyConfigFile = new File(configpath + "energy.cfg");
|
||||
|
||||
ConfigMain.init(mainConfigFile);
|
||||
ConfigItem.init(itemConfigFile);
|
||||
@@ -27,5 +29,6 @@ public class LoadConfiguration {
|
||||
ConfigDebug.init(debugConfigFile);
|
||||
ConfigExperimental.init(experimentalConfigFile);
|
||||
ConfigMarket.init(marketConfigFile);
|
||||
ConfigEnergy.init(energyConfigFile);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user