mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Fix is/are grammar issues for players online (Thanks JCT400THz), also update /help model (Thanks goodlyay), closes #165.
This commit is contained in:
parent
47048bcfc7
commit
d53d02e9c5
@ -44,7 +44,7 @@ namespace MCGalaxy.Commands {
|
||||
string model = null;
|
||||
|
||||
if (isBot && args.Length > 2) {
|
||||
pBot = PlayerBot.FindOrShowMatches(p, args[1]);
|
||||
pBot = PlayerBot.FindOrShowMatches(p, args[1]);
|
||||
if (pBot == null) return;
|
||||
model = args[2];
|
||||
} else if (args.Length > 1) {
|
||||
@ -80,12 +80,18 @@ namespace MCGalaxy.Commands {
|
||||
public override void Help(Player p) {
|
||||
Player.Message(p, "/model [name] [model] - Sets the model of that player.");
|
||||
Player.Message(p, "/model bot [name] [model] - Sets the model of that bot.");
|
||||
Player.Message(p, "Available models: Chibi, Chicken, Creeper, Croc, Humanoid, Pig, Printer, Sheep, Spider, Skeleton, Zombie.");
|
||||
Player.Message(p, "You can also place a block ID instead of a model name, to change your model into a block!");
|
||||
HelpModels(p);
|
||||
}
|
||||
|
||||
protected void HelpModels(Player p) {
|
||||
Player.Message(p, "Available models: Chibi, Chicken, Creeper, Giant, Humanoid, Pig, Sheep, Spider, Skeleton, Zombie.");
|
||||
Player.Message(p, "You can also use a block ID for the model name, to set a block model.");
|
||||
Player.Message(p, "You can also put a |[scale] after the model name to have the client draw the model at that scale. " +
|
||||
"Note this is not supported by all clients.");
|
||||
}
|
||||
}
|
||||
|
||||
public class CmdXModel : Command {
|
||||
public class CmdXModel : CmdModel {
|
||||
|
||||
public override string name { get { return "xmodel"; } }
|
||||
public override string shortcut { get { return "xm"; } }
|
||||
@ -96,13 +102,12 @@ namespace MCGalaxy.Commands {
|
||||
public override void Use(Player p, string message) {
|
||||
if (p == null) { MessageInGameOnly(p); }
|
||||
string model = message == "" ? "humanoid" : message;
|
||||
Command.all.Find("model").Use(p, p.name + " " + model);
|
||||
base.Use(p, p.name + " " + model);
|
||||
}
|
||||
|
||||
public override void Help(Player p) {
|
||||
Player.Message(p, "/xm [model] - Sets your own model.");
|
||||
Player.Message(p, "Available models: Chibi, Chicken, Creeper, Croc, Humanoid, Pig, Printer, Sheep, Spider, Skeleton, Zombie.");
|
||||
Player.Message(p, "You can also place a block ID instead of a model name, to change your model into a block!");
|
||||
HelpModels(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,7 +88,11 @@ namespace MCGalaxy.Commands
|
||||
}
|
||||
}
|
||||
|
||||
output("There are &a" + totalPlayers + " %Splayers online.");
|
||||
if (totalPlayers == 1)
|
||||
output("There is &a1 %Splayer online.");
|
||||
else
|
||||
output("There are &a" + totalPlayers + " %Splayers online.");
|
||||
|
||||
devSec.Print(output, false);
|
||||
modsSec.Print(output, false);
|
||||
|
||||
|
@ -62,12 +62,13 @@ namespace MCGalaxy.Commands
|
||||
{
|
||||
List<string> list = VIP.GetAll();
|
||||
if (list.Count < 1) Player.Message(p, "There are no VIPs.");
|
||||
else
|
||||
{
|
||||
else {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (string name in list)
|
||||
sb.Append(name).Append(", ");
|
||||
Player.Message(p, "There are " + list.Count + " VIPs:");
|
||||
|
||||
string count = list.Count > 1 ? "is 1" : "are " + list.Count;
|
||||
Player.Message(p, "There " + count + " VIPs:");
|
||||
Player.Message(p, sb.Remove(sb.Length - 2, 2).ToString());
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
using MCGalaxy.SQL;
|
||||
namespace MCGalaxy.Commands {
|
||||
|
||||
public sealed class CmdColor : Command {
|
||||
public class CmdColor : Command {
|
||||
|
||||
public override string name { get { return "color"; } }
|
||||
public override string shortcut { get { return ""; } }
|
||||
@ -66,30 +66,31 @@ namespace MCGalaxy.Commands {
|
||||
public override void Help(Player p) {
|
||||
Player.Message(p, "/color <player> [color] - Gives <player> the nick color of [color].");
|
||||
Player.Message(p, "If no [color] is specified, player's nick color reverts to group default.");
|
||||
HelpColors(p);
|
||||
}
|
||||
|
||||
protected void HelpColors(Player p) {
|
||||
Player.Message(p, "&0black &1navy &2green &3teal &4maroon &5purple &6gold &7silver");
|
||||
Player.Message(p, "&8gray &9blue &alime &baqua &cred &dpink &eyellow &fwhite");
|
||||
Player.Message(p, "To see a list of all colors, use /help colors.");
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class CmdXColor : Command {
|
||||
public sealed class CmdXColor : CmdColor {
|
||||
|
||||
public override string name { get { return "xcolor"; } }
|
||||
public override string shortcut { get { return ""; } }
|
||||
public override string type { get { return CommandTypes.Other; } }
|
||||
public override bool museumUsable { get { return true; } }
|
||||
public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
|
||||
public CmdXColor() { }
|
||||
|
||||
public override void Use(Player p, string message) {
|
||||
if (message != "") message = " " + message;
|
||||
Command.all.Find("color").Use(p, p.name + message);
|
||||
base.Use(p, p.name + message);
|
||||
}
|
||||
|
||||
public override void Help(Player p) {
|
||||
Player.Message(p, "/xcolor [color] - Gives you the nick color of [color].");
|
||||
Player.Message(p, "If no [color] is specified, your nick color reverts to group default.");
|
||||
Player.Message(p, "&0black &1navy &2green &3teal &4maroon &5purple &6gold &7silver");
|
||||
Player.Message(p, "&8gray &9blue &alime &baqua &cred &dpink &eyellow &fwhite");
|
||||
HelpColors(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
using MCGalaxy.SQL;
|
||||
namespace MCGalaxy.Commands {
|
||||
|
||||
public sealed class CmdTColor : Command {
|
||||
public class CmdTColor : Command {
|
||||
|
||||
public override string name { get { return "tcolor"; } }
|
||||
public override string shortcut { get { return ""; } }
|
||||
@ -61,30 +61,31 @@ namespace MCGalaxy.Commands {
|
||||
public override void Help(Player p) {
|
||||
Player.Message(p, "/tcolor <player> [color] - Gives <player> the title color of [color].");
|
||||
Player.Message(p, "If no [color] is specified, title color is removed.");
|
||||
HelpColors(p);
|
||||
}
|
||||
|
||||
protected void HelpColors(Player p) {
|
||||
Player.Message(p, "&0black &1navy &2green &3teal &4maroon &5purple &6gold &7silver");
|
||||
Player.Message(p, "&8gray &9blue &alime &baqua &cred &dpink &eyellow &fwhite");
|
||||
Player.Message(p, "To see a list of all colors, use /help colors.");
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class CmdXTColor : Command {
|
||||
public sealed class CmdXTColor : CmdTColor {
|
||||
|
||||
public override string name { get { return "xtcolor"; } }
|
||||
public override string shortcut { get { return ""; } }
|
||||
public override string type { get { return CommandTypes.Other; } }
|
||||
public override bool museumUsable { get { return true; } }
|
||||
public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
|
||||
public CmdXTColor() { }
|
||||
|
||||
public override void Use(Player p, string message) {
|
||||
if (message != "") message = " " + message;
|
||||
Command.all.Find("tcolor").Use(p, p.name + message);
|
||||
base.Use(p, p.name + message);
|
||||
}
|
||||
|
||||
public override void Help(Player p) {
|
||||
Player.Message(p, "/xtcolor [color] - Gives you the title color of [color].");
|
||||
Player.Message(p, "If no [color] is specified, title color is removed.");
|
||||
Player.Message(p, "&0black &1navy &2green &3teal &4maroon &5purple &6gold &7silver");
|
||||
Player.Message(p, "&8gray &9blue &alime &baqua &cred &dpink &eyellow &fwhite");
|
||||
HelpColors(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
using MCGalaxy.SQL;
|
||||
namespace MCGalaxy.Commands {
|
||||
|
||||
public sealed class CmdTitle : Command {
|
||||
public class CmdTitle : Command {
|
||||
|
||||
public override string name { get { return "title"; } }
|
||||
public override string shortcut { get { return ""; } }
|
||||
@ -64,18 +64,15 @@ namespace MCGalaxy.Commands {
|
||||
}
|
||||
}
|
||||
|
||||
public class CmdXTitle : Command {
|
||||
public class CmdXTitle : CmdTitle {
|
||||
|
||||
public override string name { get { return "xtitle"; } }
|
||||
public override string shortcut { get { return ""; } }
|
||||
public override string type { get { return CommandTypes.Other; } }
|
||||
public override bool museumUsable { get { return true; } }
|
||||
public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
|
||||
public CmdXTitle() { }
|
||||
|
||||
public override void Use(Player p, string message) {
|
||||
if (message != "") message = " " + message;
|
||||
Command.all.Find("title").Use(p, p.name + message);
|
||||
base.Use(p, p.name + message);
|
||||
}
|
||||
|
||||
public override void Help(Player p) {
|
||||
|
@ -90,8 +90,9 @@ namespace MCGalaxy {
|
||||
|
||||
Player[] players = PlayerInfo.Online.Items;
|
||||
SendMessage("You have modified &a" + overallBlocks + " %Sblocks!");
|
||||
string prefix = players.Length == 1 ? "There is" : "There are";
|
||||
string suffix = players.Length == 1 ? " player online" : " players online";
|
||||
SendMessage("There are currently &a" + players.Length + suffix);
|
||||
SendMessage(prefix + " currently &a" + players.Length + suffix);
|
||||
|
||||
if (Server.lava.active)
|
||||
SendMessage("There is a &aLava Survival %Sgame active! Join it by typing /ls go");
|
||||
|
Loading…
x
Reference in New Issue
Block a user