From bc6a3fe166434c65914bd51c5c84d00cda49764c Mon Sep 17 00:00:00 2001 From: Goodlyay Date: Mon, 11 May 2020 00:32:34 -0700 Subject: [PATCH] Make /whonick and /whonick bot consistent And change message when no PlayerClick for /botinfo --- MCGalaxy/Commands/Bots/CmdBot.cs | 5 +++-- MCGalaxy/Commands/Information/CmdWhoNick.cs | 9 ++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/MCGalaxy/Commands/Bots/CmdBot.cs b/MCGalaxy/Commands/Bots/CmdBot.cs index 11c1db839..83be2b8e5 100644 --- a/MCGalaxy/Commands/Bots/CmdBot.cs +++ b/MCGalaxy/Commands/Bots/CmdBot.cs @@ -211,8 +211,9 @@ namespace MCGalaxy.Commands.Bots { if (botName.Length == 0) { if (!p.Supports(CpeExt.PlayerClick)) { p.Message("Your client does not support clicking on entities."); - p.Message("You must type either %T/botinfo [name] %Sor"); - p.Message("%T/whonick bot [nickname] %Sto see bot info."); + p.Message("You must type %T/botinfo [name] %Sto see info."); + p.Message("To help find the name of a nicknamed bot, try"); + p.Message("%T/whonick bot [nickname]"); return; } p.checkingBotInfo = true; diff --git a/MCGalaxy/Commands/Information/CmdWhoNick.cs b/MCGalaxy/Commands/Information/CmdWhoNick.cs index 9d9913a9a..b8b68f34c 100644 --- a/MCGalaxy/Commands/Information/CmdWhoNick.cs +++ b/MCGalaxy/Commands/Information/CmdWhoNick.cs @@ -37,9 +37,8 @@ namespace MCGalaxy.Commands.Info { static void ForPlayer(Player p, string message) { Player nick = FindNick(p, message); - if (nick == null) return; - p.Message("This player's real username is " + nick.name); + p.Message("The player nicknamed {0} %Sis named {1}", nick.DisplayName, nick.name); } static Player FindNick(Player p, string nick) { nick = Colors.Strip(nick); @@ -50,9 +49,9 @@ namespace MCGalaxy.Commands.Info { } static void ForBot(Player p, string message) { - PlayerBot nick = FindBotNick(p, message); - if (nick == null) return; - nick.DisplayInfo(p); + PlayerBot bot = FindBotNick(p, message); + if (bot == null) return; + p.Message("The bot nicknamed {0} %Sis named {1}", bot.DisplayName, bot.name); } static PlayerBot FindBotNick(Player p, string nick) { nick = Colors.Strip(nick);