From 225c17f62952de52e8b2bcaee96ab54bb1af6233 Mon Sep 17 00:00:00 2001 From: Goodlyay Date: Sat, 6 Apr 2024 23:56:20 -0700 Subject: [PATCH] Display pronouns in /whois, if selected --- MCGalaxy/Database/Stats/OnlineStat.cs | 4 ++++ MCGalaxy/Player/Pronouns.cs | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/MCGalaxy/Database/Stats/OnlineStat.cs b/MCGalaxy/Database/Stats/OnlineStat.cs index cbda0e0a8..bd2f13256 100644 --- a/MCGalaxy/Database/Stats/OnlineStat.cs +++ b/MCGalaxy/Database/Stats/OnlineStat.cs @@ -53,6 +53,10 @@ public static void CoreLine(Player p, Player who) { internal static void CommonCoreLine(Player p, string fullName, string name, Group grp, int messages) { p.Message("{0} &S({1}) has:", fullName, name); p.Message(" Rank of {0}&S, wrote &a{1} &Smessages", grp.ColoredName, messages); + + Pronouns pro = Pronouns.GetFor(name); + if (pro == Pronouns.Default) { return; } + p.Message(" Pronouns: &a{0}", pro.Name); } public static void MiscLine(Player p, string name, int deaths, int money) { diff --git a/MCGalaxy/Player/Pronouns.cs b/MCGalaxy/Player/Pronouns.cs index 1aaee232d..e73c5ebe3 100644 --- a/MCGalaxy/Player/Pronouns.cs +++ b/MCGalaxy/Player/Pronouns.cs @@ -36,7 +36,6 @@ public class Pronouns { /// /// Called once to initialize the defaults and write/read the config file as necessary. /// - /// public static void Init(SchedulerTask task) { if (!Directory.Exists(PLAYER_PATH)) { @@ -221,7 +220,7 @@ public void SaveFor(Player p) { string path = PlayerPath(p.name); try { //Reduce clutter by simply erasing the file if it's default - if (this.Name == Default.Name) { File.Delete(path); return; } + if (this == Default) { File.Delete(path); return; } File.WriteAllText(path, Name); } catch (Exception e) {