New Config File:
• Ok, You should know how to add new config option to .properties files etc. So now I'll show how to create new .properties file. For example: matim.properties
- Ok, firstly lets create new .properties called matim.java (this is sample) in java/configfolder.
- Now open Config.java file. Ok firstly lets register Our new config file, find these lines:
Code:
//--------------------------------------------------
// L2J Property File Definitions
//--------------------------------------------------
public static final String CHARACTER_CONFIG_FILE = "./config/Character.properties";
public static final String EXTENSIONS_CONFIG_FILE = "./config/extensions.properties";
public static final String FEATURE_CONFIG_FILE = "./config/Feature.properties";
public static final String FORTSIEGE_CONFIGURATION_FILE = "./config/fortsiege.properties";
public static final String GENERAL_CONFIG_FILE = "./config/General.properties";
public static final String HEXID_FILE = "./config/hexid.txt";
public static final String ID_CONFIG_FILE = "./config/idfactory.properties";
public static final String SERVER_VERSION_FILE = "./config/l2j-version.properties";
public static final String DATAPACK_VERSION_FILE = "./config/l2jdp-version.properties";
public static final String L2JMOD_CONFIG_FILE = "./config/l2jmods.properties";
public static final String LOGIN_CONFIGURATION_FILE = "./config/loginserver.properties";
public static final String NPC_CONFIG_FILE = "./config/NPC.properties";
public static final String PVP_CONFIG_FILE = "./config/pvp.properties";
public static final String RATES_CONFIG_FILE = "./config/rates.properties";
public static final String CONFIGURATION_FILE = "./config/server.properties";
public static final String SIEGE_CONFIGURATION_FILE = "./config/siege.properties";
public static final String TELNET_FILE = "./config/telnet.properties";
public static final String FLOOD_PROTECTOR_FILE = "./config/floodprotector.properties";
public static final String MMO_CONFIG_FILE = "./config/mmo.properties";
- And lets add Our:
Quote
public static final String MATIM_CONFIG_FILE = "./config/matim.properties";
- Ok, Our config file is already registered now. Now we should add few things into class witch initializes all global variables for configuration.
- Find these lines:
Code:
}
catch (Exception e)
{
e.printStackTrace();
throw new Error("Failed to Load "+L2JMOD_CONFIG_FILE+" File.");
}
- And under them paste this:
Quote
// Load PvP Properties file (if exists)
try
{
Properties matimSettings = new Properties();
is = new FileInputStream(new File(MATIM_CONFIG_FILE));
matimSettings.load(is);
/** Here You can put Your configs (look at "Your Own Config") This is sample:
ALLOW_CREATE_LVL = Boolean.parseBoolean(matimSettings.getProperty("CostumStartLvl", "False"));
*/
}
catch (Exception e)
{
e.printStackTrace();
throw new Error("Failed to Load " + MATIM_CONFIGURATION_FILE + " File.");
}
• Done, now Your custom Config file is created! But lines marked in green are just as sample!
ta xw akolouthisei , ta ksana vlepw kai ta ksana vlepw ala telos panton paw sto config dimiourgo ena new,
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
DISCORD :
https://discord.com/users/325653525793210378
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/uthciha-services
https://campsite.bio/utchihaamkt
Question
Azumaril$
ta xw akolouthisei , ta ksana vlepw kai ta ksana vlepw ala telos panton paw sto config dimiourgo ena new,
paw sto config.java
vazw to line:
ALLOWALLHERO = Boolean.valueOf(zeusSettings.getProperty("blablalblabla","bblalabla));
ala sto zeusSettings mou lei cannot be resolved :S
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.