Hello guys as my title says i am using l2j-frozen pack and i am trying to input a custom property file but i cant even if i do all corectly ( i think )
So let me tell you what i do:
I open this: com.l2jfrozen.FService.java
// Config Files Paths
//===========================================
+ //Custom config
+ public static final String CUSTOM_FILE_DIR = "./config/custom.properties";
Then i open: com.l2jfrozen.Config.java
private static final Logger _log = Logger.getLogger(Config.class.getName());
+
+ public static boolean ALLOW_CUSTOM;
+
+ public static void loadCustomConfig()
+ {
+ final String CUSTOM_SETTING= FService.CUSTOM_FILE_DIR;
+
+ try
+ {
+ Properties custom = new Properties();
+ InputStream is = new FileInputStream(new File(CUSTOM_SETTING));
+ custom.load(is);
+ is.close();
+ //============================================================
+ ALLOW_CUSTOM = Boolean.parseBoolean(custom.getProperty("AllowCustom", "True"));
+
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw new Error("Failed to Load " + CUSTOM_SETTING + " File.");
+ }
+ }
+
And i create the custom.properties at config directory adding the AllowCustom = True in the file, i get no error while compiling and no errors at GameServer but when i log in and try using this custom additions they dont work...
Please someone help me... Thanks in advance!
PS: Thats an example i add other things just to give you understand what i do :)
Launch of the New Top Servers Platform
We are pleased to announce the official launch of our new Top Servers platform — a space designed for administrators and communities to publish, promote, and grow their servers with complete freedom and transparency.
🔗 Direct Access:
https://www.united-extreme.com/u3games/topservers
This project was created with a clear goal: to offer a fair and open system where every server can gain the visibility it deserves thanks to player support.
🔥 Key Features:
Voting every 24 hours available for both registered and guest users.
Integrated CAPTCHA system to ensure votes are legitimate and free of bot interference.
Configurable external links — ideal for reward panels or other associated platforms.
No intrusive advertising: all servers compete under equal conditions.
Advanced user dashboard to easily manage and update published servers.
Real rate system, differentiating user and guest votes.
Organic promotion from the U3Games community, which exceeds 25,000 daily visits, providing real visibility.
Here, every server has the opportunity to grow, stand out, and build a strong community without limitations. We invite you to be part of this new stage. Publish your server, make it visible, and let the players decide.
Welcome to the new generation of tops — welcome to U3Games Top Servers.
Question
MarKoM
Hello guys as my title says i am using l2j-frozen pack and i am trying to input a custom property file but i cant even if i do all corectly ( i think )
So let me tell you what i do:
I open this: com.l2jfrozen.FService.java
Then i open: com.l2jfrozen.Config.java
private static final Logger _log = Logger.getLogger(Config.class.getName()); + + public static boolean ALLOW_CUSTOM; + + public static void loadCustomConfig() + { + final String CUSTOM_SETTING= FService.CUSTOM_FILE_DIR; + + try + { + Properties custom = new Properties(); + InputStream is = new FileInputStream(new File(CUSTOM_SETTING)); + custom.load(is); + is.close(); + //============================================================ + ALLOW_CUSTOM = Boolean.parseBoolean(custom.getProperty("AllowCustom", "True")); + + } + catch(Exception e) + { + e.printStackTrace(); + throw new Error("Failed to Load " + CUSTOM_SETTING + " File."); + } + } +And i create the custom.properties at config directory adding the AllowCustom = True in the file, i get no error while compiling and no errors at GameServer but when i log in and try using this custom additions they dont work...
Please someone help me... Thanks in advance!
PS: Thats an example i add other things just to give you understand what i do :)
3 answers to this question
Recommended Posts