Add color code support in lang files (Fixes #5)
This commit is contained in:
parent
654ddefb6e
commit
9f71eeb08b
@ -1,5 +1,7 @@
|
|||||||
package net.TheDgtl.Stargate;
|
package net.TheDgtl.Stargate;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -120,7 +122,7 @@ public class LangLoader {
|
|||||||
updated = true;
|
updated = true;
|
||||||
} else {
|
} else {
|
||||||
keyList.add(key);
|
keyList.add(key);
|
||||||
valList.add("=" + curLang.get(key));
|
valList.add("=" + curLang.get(key).replace('\u00A7', '&'));
|
||||||
curLang.remove(key);
|
curLang.remove(key);
|
||||||
}
|
}
|
||||||
line = br.readLine();
|
line = br.readLine();
|
||||||
@ -187,7 +189,7 @@ public class LangLoader {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String key = line.substring(0, eq);
|
String key = line.substring(0, eq);
|
||||||
String val = line.substring(eq + 1);
|
String val = ChatColor.translateAlternateColorCodes('&', line.substring(eq + 1));
|
||||||
strings.put(key, val);
|
strings.put(key, val);
|
||||||
line = br.readLine();
|
line = br.readLine();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user