Jump to content
  • 0

[HELP]L2j-Frozen adding custom properties


Question

Posted

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 :)

3 answers to this question

Recommended Posts

  • 0
Posted

Here i don't saw just you added config file but i dont saw any function.. what supose to do " allow configs " show us all code or  what you enbale with allow configs

  • 0
Posted

Thanks man for replying i was searching right now the config.java file and found what i was missing :)

It seems that i had to input this:

			loadHexed();

+			//Load Custom config
+			loadCustomConfig();
+

 

Tested and worked. (I am really happy right now xD )

So thanks and please someone lock this topic :)

Have a good time.

  • 0
Posted

Thanks man for replying i was searching right now the config.java file and found what i was missing :)

It seems that i had to input this:

			loadHexed();

+			//Load Custom config
+			loadCustomConfig();
+

 

Tested and worked. (I am really happy right now xD )

So thanks and please someone lock this topic :)

Have a good time.

np

 

Guest
This topic is now closed to further replies.


  • Posts

    • ➡ Discount for your purchase: APRIL (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: APRIL (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • Okay, I understand. First, to get started by contributing to open projects and learning along the way. Then, when you mention starting my own project privately, do you mean taking a free datapack like L2jMobius and trying to make it functional for an online server? Great, thank you very much — all this information is really helpful. I’ve been reaching out to several server admins here in Argentina, but it seems like none of them have the time or interest to take on an intern or assistant. xd   P.S.: Are you the creator of Hopzone? Brings back memories of when I was a kid, downloading servers at the cyber café. For two dollars, I could spend the whole day playing and eating candy like crazy.   Another question: between L2jMobius, L2jServer, and aCis, which one has ALL of its code free? As you probably noticed, I'm using ChatGPT to help me translate things, lol, and it suggested the following: Project Status Open Source Accepts Juniors? Difficulty L2JMobius Very active Semi-closed Partially (with patches) Medium-High L2JServer Active Fully open Yes (directly on GitHub) Medium aCis Semi-active Unofficial Not very clear Low
    • @Logan22 Are you logan from mmo-dev forum?
  • Topics

×
×
  • Create New...