Browse Source

Debugging

feature-config-parsing2
MagicBot 4 months ago
parent
commit
e579912733
  1. 10
      src/engine/ConfigParsing/EffectsParser.java

10
src/engine/ConfigParsing/EffectsParser.java

@ -10,6 +10,7 @@ package engine.ConfigParsing;
import engine.ConfigParsing.EffectEntry.EffectEntry; import engine.ConfigParsing.EffectEntry.EffectEntry;
import engine.gameManager.ConfigManager; import engine.gameManager.ConfigManager;
import org.pmw.tinylog.Logger;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
@ -53,7 +54,14 @@ public class EffectsParser {
// Parse effect entry description // Parse effect entry description
String firstLine = effectData.substring(0, effectData.indexOf('\n')); String firstLine;
try {
firstLine = effectData.substring(0, effectData.indexOf('\n'));
} catch (Exception e) {
Logger.error(e);
}
ArrayList<String> effectDescription = new ArrayList<>(); ArrayList<String> effectDescription = new ArrayList<>();
Matcher matcher = STRSPLIT_REGEX.matcher(firstLine); Matcher matcher = STRSPLIT_REGEX.matcher(firstLine);

Loading…
Cancel
Save