From 17e62f00d73243e73b9063517cbda8c7c3223d4a Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 27 Apr 2024 13:04:51 +1000 Subject: [PATCH] Really fix .NET 2.0 framework build --- MCGalaxy/Player/Pronouns.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/MCGalaxy/Player/Pronouns.cs b/MCGalaxy/Player/Pronouns.cs index fc91c67fb..86eafad77 100644 --- a/MCGalaxy/Player/Pronouns.cs +++ b/MCGalaxy/Player/Pronouns.cs @@ -117,13 +117,15 @@ namespace MCGalaxy { string myPath = PlayerPath(playerName); try { - string[] lines; + string data; lock (locker) { if (!File.Exists(myPath)) { return Default; } - lines = File.ReadAllLines(myPath); - } - if (lines.Length == 0 || string.IsNullOrWhiteSpace(lines[0])) { return Default; } - Pronouns p = FindExact(lines[0]); + data = File.ReadAllText(myPath); + } + data = data.Trim(); + + if (data.Length == 0) return Default; + Pronouns p = FindExact(data); if (p != null) return p; return Default;