mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-31 06:39:36 +01:00
I think this fixes the auto update config function when a config file has two similar keys. (reverted from commit 52f1e33052255369852b331fffde30f0dc495f59)
This commit is contained in:
parent
52f1e33052
commit
9bc97c6dd3
@ -88,11 +88,8 @@ public abstract class AutoUpdateConfigLoader extends ConfigLoader {
|
||||
|
||||
// Dump to the new one
|
||||
for (String key : comments.keySet()) {
|
||||
if (output.contains(" " + key)) {
|
||||
output = output.substring(0, output.indexOf(" " + key)) + comments.get(key) + output.substring(output.indexOf(" " + key));
|
||||
}
|
||||
if (output.contains("\n" + key)) {
|
||||
output = output.substring(0, output.indexOf("\n" + key)) + comments.get(key) + output.substring(output.indexOf("\n" + key));
|
||||
if (output.contains(key)) {
|
||||
output = output.substring(0, output.indexOf(key)) + comments.get(key) + output.substring(output.indexOf(key));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user