mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-10-02 10:01:34 -04:00
Make /whonick and /whonick bot consistent
And change message when no PlayerClick for /botinfo
This commit is contained in:
parent
d52d08b4b2
commit
bc6a3fe166
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user