mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 02:59:42 +00:00
Config Overhaul
This commit is contained in:
1 parent
b4cb69000e
commit
6e92f08851
51 files changed
+764
-395
No files matched your search
@@ -0,0 +1,37 @@
|
||||
package noppes.npcs.config;
|
||||
|
||||
import noppes.npcs.config.legacy.ConfigProp;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.LinkedList;
|
||||
|
||||
public class LoadConfiguration {
|
||||
public static File mainConfigFile;
|
||||
public static File scriptConfigFile;
|
||||
public static File debugConfigFile;
|
||||
public static File clientConfigFile;
|
||||
|
||||
public static void init(String configpath)
|
||||
{
|
||||
if(!dir.exists())
|
||||
dir.mkdir();
|
||||
this.dir = dir;
|
||||
configClass = clss;
|
||||
configFields = new LinkedList<Field>();
|
||||
this.fileName = fileName+".cfg";
|
||||
|
||||
mainConfigFile = new File(configpath + "main.cfg");
|
||||
clientConfigFile = new File(configpath + "client.cfg");
|
||||
scriptConfigFile = new File(configpath + "script.cfg");
|
||||
debugConfigFile = new File(configpath + "debug.cfg");
|
||||
|
||||
ConfigMain.init(mainConfigFile);
|
||||
ConfigClient.init(clientConfigFile);
|
||||
ConfigScript.init(scriptConfigFile);
|
||||
ConfigDebug.init(debugConfigFile);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user