Browse Source

Parsing conditions

feature-config-parsing2
MagicBot 4 months ago
parent
commit
c8a5224c75
  1. 2
      src/engine/ConfigParsing/EffectsParser.java
  2. 2
      src/engine/server/world/WorldServer.java

2
src/engine/ConfigParsing/EffectsParser.java

@ -32,7 +32,7 @@ public class EffectsParser {
private static final Pattern MODS_REGEX = Pattern.compile("(?<=MODSBEGIN)(.+?)(?=MODSEND)", Pattern.DOTALL); private static final Pattern MODS_REGEX = Pattern.compile("(?<=MODSBEGIN)(.+?)(?=MODSEND)", Pattern.DOTALL);
private static final Pattern STRSPLIT_REGEX = Pattern.compile("([^\"]\\S*|\"[^\"]*\")\\s*"); private static final Pattern STRSPLIT_REGEX = Pattern.compile("([^\"]\\S*|\"[^\"]*\")\\s*");
public static void init() throws IOException { public static void parseWpakFile() throws IOException {
byte[] fileData = Files.readAllBytes(Paths.get(EffectsPath)); byte[] fileData = Files.readAllBytes(Paths.get(EffectsPath));
String fileContents = new String(fileData); String fileContents = new String(fileData);

2
src/engine/server/world/WorldServer.java

@ -94,7 +94,7 @@ public class WorldServer {
return; return;
} }
EffectsParser.init(); EffectsParser.parseWpakFile();
try { try {

Loading…
Cancel
Save