Browse Source

Fixing long term events configration location

Reported by: CostyKiller
Fixes #307
Zoey76 4 years ago
parent
commit
8dad986137

+ 3 - 1
src/main/java/com/l2jserver/gameserver/model/event/LongTimeEvent.java

@@ -18,6 +18,8 @@
  */
 package com.l2jserver.gameserver.model.event;
 
+import static com.l2jserver.gameserver.config.Configuration.server;
+
 import java.io.File;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -99,7 +101,7 @@ public class LongTimeEvent extends Quest {
 	 * Load event configuration file
 	 */
 	private void loadConfig() {
-		File configFile = new File("data/events/" + getName() + ".xml");
+		File configFile = new File(server().getDatapackRoot(), "data/events/" + getName() + ".xml");
 		try {
 			DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
 			DocumentBuilder db = dbf.newDocumentBuilder();