Display pronouns in /whois, if selected

This commit is contained in:
Goodlyay 2024-04-06 23:56:20 -07:00
parent 1bf0f7ae36
commit 225c17f629
2 changed files with 5 additions and 2 deletions

View File

@ -53,6 +53,10 @@ namespace MCGalaxy.DB
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) {

View File

@ -36,7 +36,6 @@ namespace MCGalaxy {
/// <summary>
/// Called once to initialize the defaults and write/read the config file as necessary.
/// </summary>
/// <param name="task"></param>
public static void Init(SchedulerTask task) {
if (!Directory.Exists(PLAYER_PATH)) {
@ -221,7 +220,7 @@ namespace MCGalaxy {
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) {