mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Fixed bug where config categories errored if they contained regex special characters. (#4187)
This commit is contained in:
1 parent
d3fa82c18a
commit
7df003c3e7
1 file changed
+3
-1
@@ -43,6 +43,8 @@ import net.minecraftforge.fml.common.discovery.ASMDataTable;
|
||||
import net.minecraftforge.fml.common.discovery.ASMDataTable.ASMData;
|
||||
import net.minecraftforge.fml.common.discovery.asm.ModAnnotation.EnumHolder;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class ConfigManager
|
||||
{
|
||||
private static Map<String, Multimap<Config.Type, ASMData>> asm_data = Maps.newHashMap();
|
||||
@@ -246,7 +248,7 @@ public class ConfigManager
|
||||
|
||||
for (String key : wrapper.getKeys())
|
||||
{
|
||||
String suffix = key.replaceFirst(wrapper.getCategory() + ".", "");
|
||||
String suffix = StringUtils.replaceOnce(key, wrapper.getCategory() + ".", "");
|
||||
|
||||
boolean existed = exists(cfg, wrapper.getCategory(), suffix);
|
||||
if (!existed || loading) //Creates keys in category specified by the wrapper if new ones are programaticaly added
|
||||
|
||||
Reference in new issue
Block a user