mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 12:42:22 -04:00
Fix custom chat tokens with : in them
This commit is contained in:
parent
db1fe40f90
commit
a0725bfe48
@ -116,11 +116,12 @@ namespace MCGalaxy {
|
||||
}
|
||||
|
||||
string[] lines = tokensFile.GetText();
|
||||
string[] parts = new string[2];
|
||||
char[] colon = new char[] {':'};
|
||||
|
||||
foreach (string line in lines) {
|
||||
if (line.StartsWith("//")) continue;
|
||||
line.FixedSplit(parts, ':');
|
||||
if (parts[1] == null) continue; // not a proper line
|
||||
string[] parts = line.Split(colon, 2);
|
||||
if (parts.Length == 1) continue; // not a proper line
|
||||
|
||||
string key = parts[0].Trim(), value = parts[1].Trim();
|
||||
if (key.Length == 0) continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user