From 7d8117173f2c5485847d6fdcb59ac2675609eef8 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 24 Jul 2024 19:38:28 -0500 Subject: [PATCH] parsing multi worded names --- src/engine/ConfigParsing/EffectsParser.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/ConfigParsing/EffectsParser.java b/src/engine/ConfigParsing/EffectsParser.java index 3f24067d..7f9e9cc0 100644 --- a/src/engine/ConfigParsing/EffectsParser.java +++ b/src/engine/ConfigParsing/EffectsParser.java @@ -108,7 +108,12 @@ public class EffectsParser { while (!compiledLines.get(index + extra).contains("MODSEND")) { //data.mods.add(lines[index + extra].Replace(" ", "")); - mod.type = mbEnums.ModType.valueOf(compiledLines.get(index + extra).replace(" ", "").split(" ")[0]); + String rawValue = compiledLines.get(index + extra).replace(" ", "").split(" ")[0]; + try { + mod.type = mbEnums.ModType.valueOf(rawValue); + }catch(Exception e){ + mod.type = mbEnums.ModType.None; + } GenerateModValues(mod, compiledLines.get(index + extra).replace(" ", "").replace(" ", "").split(" ")); extra++; }