Fix help to use colour codes for a whole bunch of commands.

This commit is contained in:
UnknownShadow200 2016-06-23 17:00:07 +10:00
parent 6bfc38507c
commit a439ab3144
93 changed files with 284 additions and 200 deletions

View File

@ -15,13 +15,11 @@
or implied. See the Licenses for the specific language governing
permissions and limitations under the Licenses.
*/
namespace MCGalaxy.Commands
{
public sealed class CmdBotAdd : Command
{
namespace MCGalaxy.Commands {
public sealed class CmdBotAdd : Command {
public override string name { get { return "botadd"; } }
public override string shortcut { get { return ""; } }
public override string type { get { return CommandTypes.Moderation; } }
public override string type { get { return CommandTypes.Moderation; } }
public override bool museumUsable { get { return false; } }
public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
public CmdBotAdd() { }

View File

@ -16,10 +16,8 @@
permissions and limitations under the Licenses.
*/
using System;
namespace MCGalaxy.Commands {
public sealed class CmdBotRemove : Command {
namespace MCGalaxy.Commands {
public sealed class CmdBotRemove : Command {
public override string name { get { return "botremove"; } }
public override string shortcut { get { return ""; } }
public override string type { get { return CommandTypes.Moderation; } }

View File

@ -92,8 +92,8 @@ namespace MCGalaxy.Commands.CPE {
public override void Help(Player p) {
Player.Message(p, "%T/model [name] [model] %H- Sets the model of that player.");
Player.Message(p, "%T/model bot [name] [model] %H- Sets the model of that bot.");
Player.Message(p, "Available models: Chibi, Chicken, Creeper, Giant, Humanoid, Pig, Sheep, Spider, Skeleton, Zombie.");
Player.Message(p, "To set a block model, use a block ID for the model name.");
Player.Message(p, "%HAvailable models: %SChibi, Chicken, Creeper, Giant, Humanoid, Pig, Sheep, Spider, Skeleton, Zombie.");
Player.Message(p, "%HTo set a block model, use a block ID for the model name.");
Player.Message(p, "%HFor setting scaling models, put \"|[scale]\" after the model name (not supported by all clients).");
}
}

View File

@ -33,7 +33,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/flipheads - Does as it says on the tin");
Player.Message(p, "%T/flipheads");
Player.Message(p, "%HMakes all players have upside down heads");
}
}
}

View File

@ -106,8 +106,9 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/gun [at end] - Allows you to fire bullets at people");
Player.Message(p, "Available [at end] values: &cexplode, destroy, laser, tp");
Player.Message(p, "%T/gun [at end]");
Player.Message(p, "%HAllows you to fire bullets at people");
Player.Message(p, "%HAvailable [at end] types: %Sexplode, destroy, laser, tp");
}
}
}

View File

@ -139,9 +139,9 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/missile [at end] - Allows you to fire missiles at people");
Player.Message(p, "Available [at end] values: &cexplode, destroy, tp");
Player.Message(p, "Differs from /gun in that the missile is guided");
Player.Message(p, "%T/missile [at end]");
Player.Message(p, "%HAllows you to fire missiles at people. Differs from /gun in that the missile is guided.");
Player.Message(p, "%HAvailable [at end] types: %Sexplode, destroy, tp");
}
}
}

View File

@ -71,8 +71,10 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/slap <name> - Slaps <name>, knocking them into the air");
Player.Message(p, "/slap <level> - Slaps all players on <level> that are a lower rank than you, knocking them into the air");
Player.Message(p, "%T/slap <name>");
Player.Message(p, "%HSlaps <name>, knocking them into the air");
Player.Message(p, "%T/slap <level>");
Player.Message(p, "%HSlaps all players on <level> that are a lower rank than you, knocking them into the air");
}
}
}

View File

@ -42,7 +42,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/alive - shows who is alive");
Player.Message(p, "%T/alive");
Player.Message(p, "%HShows who is alive/a human");
}
}
}

View File

@ -40,7 +40,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/disinfect [name] - disinfects [name]");
Player.Message(p, "%T/disinfect [name]");
Player.Message(p, "%HTurns [name] back into a human");
}
}
}

View File

@ -33,7 +33,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/endround - ends the round");
Player.Message(p, "%T/endround");
Player.Message(p, "%HEnds the current round of zombie survival");
}
}
}

View File

@ -40,7 +40,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/infect [name] - infects [name]");
Player.Message(p, "%T/infect [name]");
Player.Message(p, "%HTurns [name] into a zombie");
}
}
}

View File

@ -42,7 +42,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/infected - shows who is infected");
Player.Message(p, "%T/infected");
Player.Message(p, "%HShows who is infected/a zombie");
}
}
}

View File

@ -55,8 +55,10 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/queue zombie [name] - Next round [name] will be infected");
Player.Message(p, "/queue level [name] - Next round [name] will be the round loaded");
Player.Message(p, "%T/queue zombie [name]");
Player.Message(p, "%HNext round [name] will be infected/start zombie");
Player.Message(p, "%T/queue level [name]");
Player.Message(p, "%HNext round [name] will be the level used");
}
}
}

View File

@ -47,7 +47,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/referee - Turns referee mode on/off.");
Player.Message(p, "%T/referee");
Player.Message(p, "%HTurns referee mode on/off.");
}
}
}

View File

@ -100,7 +100,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/about - Displays information about a block.");
Player.Message(p, "%T/about");
Player.Message(p, "%HDisplays information about a block.");
}
}
}

View File

@ -70,7 +70,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/afk <reason> - mark yourself as AFK. Use again to mark yourself as back");
Player.Message(p, "%T/afk <reason>");
Player.Message(p, "%HMarks yourself as AFK. Use again to mark yourself as back");
}
}
}

View File

@ -69,7 +69,8 @@ namespace MCGalaxy.Commands.Moderation {
}
public override void Help(Player p) {
Player.Message(p, "/baninfo <player> - returns info about banned player.");
Player.Message(p, "%T/baninfo <player>");
Player.Message(p, "%Hreturns info about banned player.");
}
}
}

View File

@ -40,7 +40,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/changelog - View the most recent changelog.");
Player.Message(p, "%T/changelog");
Player.Message(p, "%HView the most recent changelog for MCGalaxy.");
}
}
}

View File

@ -66,7 +66,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/clones <name> - Finds everyone with the same IP as <name>");
Player.Message(p, "%T/clones <name>");
Player.Message(p, "%HFinds everyone with the same IP as <name>");
}
}
}

View File

@ -31,7 +31,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/devs - Displays the MCGalaxy team (Developers and moderators).");
Player.Message(p, "%T/devs");
Player.Message(p, "%HDisplays the MCGalaxy team (Developers and moderators).");
}
}
}

View File

@ -37,7 +37,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/faq - Displays frequently asked questions");
Player.Message(p, "%T/faq");
Player.Message(p, "%HDisplays frequently asked questions");
}
}
}

View File

@ -38,7 +38,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/news - Shows server news.");
Player.Message(p, "%T/news");
Player.Message(p, "%HShows server news.");
}
}
}

View File

@ -50,7 +50,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/oprules [player]- Displays server oprules to a player");
Player.Message(p, "%T/oprules [player]");
Player.Message(p, "%HDisplays server oprules to a player");
}
}
}

View File

@ -106,7 +106,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/opstats [player] [today]|[yesterday]|[thismonth]|[lastmonth]|[all] - Displays information about operator command usage.");
Player.Message(p, "%T/opstats [player] [today]|[yesterday]|[thismonth]|[lastmonth]|[all]");
Player.Message(p, "%HDisplays information about operator command usage.");
}
}
}

View File

@ -56,7 +56,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/rankinfo [player] - Returns details about that person's rankings.");
Player.Message(p, "%T/rankinfo [player]");
Player.Message(p, "%HReturns details about that person's rankings.");
}
}
}

View File

@ -61,10 +61,12 @@ namespace MCGalaxy.Commands
public override void Help(Player p) {
if (CheckExtraPerm(p)) {
Player.Message(p, "/rules [player]- Displays server rules to a player.");
Player.Message(p, "If no [player] is given, the rules will be sent to you.");
Player.Message(p, "%T/rules [player]");
Player.Message(p, "%HDisplays server rules to [player].");
Player.Message(p, "%HIf no [player] is given, the rules will be sent to you.");
} else {
Player.Message(p, "/rules - Displays the server rules.");
Player.Message(p, "%T/rules");
Player.Message(p, "%HDisplays the server rules.");
}
}
}

View File

@ -111,11 +111,11 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "&b/search &2blocks &a<keyword> &e- finds blocks with that keyword");
Player.Message(p, "&b/search &2ranks &a<keyword> &e- finds blocks with that keyword");
Player.Message(p, "&b/search &2players &a<keyword> &e- find players with that keyword");
Player.Message(p, "&b/search &2loaded &a<keyword> &e- finds loaded levels with that keyword");
Player.Message(p, "&b/search &2levels &a<keyword> &e- find all levels with that keyword");
Player.Message(p, "%T/search blocks <keyword> %H- finds blocks with that keyword");
Player.Message(p, "%T/search ranks <keyword> %H- finds blocks with that keyword");
Player.Message(p, "%T/search players <keyword> %H- find players with that keyword");
Player.Message(p, "%T/search loaded <keyword> %H- finds loaded levels with that keyword");
Player.Message(p, "%T/search levels <keyword> %H- find all levels with that keyword");
}
}
}

View File

@ -51,7 +51,7 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/allowguns [level]");
Player.Message(p, "%T/allowguns [level]");
Player.Message(p, "%HAllows/disallows guns and missiles on the specified level.");
Player.Message(p, "%HIf no [level] is given, uses your current level.");
}

View File

@ -92,9 +92,10 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/bs [option] [option value] - Options for block speeds.");
Player.Message(p, "Options are: bs (blocks per interval), ts (interval in milliseconds), buf (toggles buffering), clear, net.");
Player.Message(p, "/bs net [2,4,8,12,16,20,24] - Presets, divide by 8 and times by 1000 to get blocks per second.");
Player.Message(p, "%T/bs [option] [option] [value].");
Player.Message(p, "%HOptions for block speeds are: %Sbs (blocks per interval), ts (interval in milliseconds), buf (toggles buffering), clear, net.");
Player.Message(p, "%T/bs net [2,4,8,12,16,20,24]");
Player.Message(p, "%HPresets, divide by 8 and times by 1000 to get blocks per second.");
}
}
}

View File

@ -114,8 +114,10 @@ namespace MCGalaxy.Commands
public override void Help(Player p)
{
Player.Message(p, "/follow <name> - Follows <name> until the command is cancelled");
Player.Message(p, "/follow # <name> - Will cause /hide not to be toggled");
Player.Message(p, "%T/follow <name>");
Player.Message(p, "%HFollows <name> until the command is cancelled");
Player.Message(p, "%T/follow # <name>");
Player.Message(p, "%HWill cause /hide not to be toggled");
}
}
}

View File

@ -51,7 +51,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/freeze <name> - Stops <name> from moving until unfrozen.");
Player.Message(p, "%T/freeze <name>");
Player.Message(p, "%HStops <name> from moving until unfrozen.");
}
}
}

View File

@ -65,7 +65,10 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/ircctrl <reload/add/remove/list> [name]");
Player.Message(p, "%T/ircctrl <add/remove> [name]");
Player.Message(p, "%HAdds or removes <name> from list of IRC controllers");
Player.Message(p, "%T/ircctrl <reload/list>");
Player.Message(p, "%HReloads or outputslist of IRC controllers");
}
}
}

View File

@ -62,9 +62,11 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/jail [user] - Places [user] in jail unable to use commands.");
Player.Message(p, "/jail [set] - Creates the jail point for the map.");
Player.Message(p, "This command has been deprecated in favor of /xjail.");
Player.Message(p, "%T/jail [user]");
Player.Message(p, "%HPlaces [user] in jail unable to use commands.");
Player.Message(p, "%T/jail set");
Player.Message(p, "%HCreates the jail point for the map.");
Player.Message(p, "%H This has been deprecated in favor of /xjail.");
}
}
}

View File

@ -88,11 +88,12 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/limit <type> <amount> [rank] - Sets the limit for <type>");
Player.Message(p, "Valid types: reloadthreshold(rt), restartphysics(rp), " +
Player.Message(p, "%T/limit <type> <amount> [rank]");
Player.Message(p, "%HSets the limit for <type>");
Player.Message(p, "%HValid types: reloadthreshold(rt), restartphysics(rp), " +
"rpnormal, physicsundo(pu), drawlimit(dl), maxundo(mu), genlimit(gen), " +
"admingenlimit(admingen)");
Player.Message(p, "Rank is required for drawlimit and maxundo types.");
Player.Message(p, "%HRank is required for drawlimit and maxundo types.");
}
}
}

View File

@ -44,7 +44,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/p2p [source] [target] - Teleports the source player to the target player.");
Player.Message(p, "%T/p2p [source] [target]");
Player.Message(p, "%HTeleports the source player to the target player.");
}
}
}

View File

@ -26,17 +26,14 @@ namespace MCGalaxy.Commands
{
public override string name { get { return "patrol"; } }
public override string shortcut { get { return ""; } }
public override string type { get { return CommandTypes.Moderation; } }
public override string type { get { return CommandTypes.Moderation; } }
public override bool museumUsable { get { return false; } }
public override LevelPermission defaultRank { get { return LevelPermission.Builder; } }
public override CommandPerm[] AdditionalPerms {
get { return new[] { new CommandPerm(LevelPermission.Guest, " and below are patrolled") }; }
}
public override void Help(Player p)
{
Player.Message(p, "/patrol - Teleports you to a random " + Group.findPermInt(CommandOtherPerms.GetPerm(this)).name + " or lower");
}
public override void Use(Player p, string message)
{
@ -56,5 +53,10 @@ namespace MCGalaxy.Commands
Command.all.Find("tp").Use(p, who.name);
Player.Message(p, "Now visiting " + who.ColoredName + "%S.");
}
public override void Help(Player p) {
Player.Message(p, "%T/patrol");
Player.Message(p, "%HTeleports you to a random " + Group.findPermInt(CommandOtherPerms.GetPerm(this)).name + " or lower");
}
}
}

View File

@ -194,15 +194,15 @@ namespace MCGalaxy.Commands {
}
static void MessageValidTypes(Player p) {
Player.Message(p, "Valid types: FirstLogin, LastLogin, TotalLogins, Title, TotalDeaths, Money, " +
Player.Message(p, "%HValid types: %SFirstLogin, LastLogin, TotalLogins, Title, TotalDeaths, Money, " +
"TotalBlocks, TotalCuboid, TotalKicked, TimeSpent, Color, TitleColor ");
}
public override void Help(Player p) {
Player.Message(p, "/pe <username> <type> <value>");
Player.Message(p, "Edits an online or offline player's information. Use with caution!");
Player.Message(p, "%T/pe <username> <type> <value>");
Player.Message(p, "%HEdits an online or offline player's information. Use with caution!");
MessageValidTypes(p);
Player.Message(p, "To see value format for a specific type, leave <value> blank.");
Player.Message(p, "%HTo see value format for a specific type, leave <value> blank.");
}
}
}

View File

@ -15,24 +15,22 @@
or implied. See the Licenses for the specific language governing
permissions and limitations under the Licenses.
*/
namespace MCGalaxy.Commands
{
public sealed class CmdResetBot : Command
{
namespace MCGalaxy.Commands {
public sealed class CmdResetBot : Command {
public override string name { get { return "resetbot"; } }
public override string shortcut { get { return "resetirc"; } }
public override string type { get { return CommandTypes.Moderation; } }
public override string type { get { return CommandTypes.Moderation; } }
public override bool museumUsable { get { return true; } }
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
public CmdResetBot() { }
public override void Use(Player p, string message)
{
public override void Use(Player p, string message) {
Server.IRC.Reset();
}
public override void Help(Player p)
{
Player.Message(p, "/resetbot - reloads the IRCBot. FOR EMERGENCIES ONLY!");
public override void Help(Player p) {
Player.Message(p, "%T/resetbot");
Player.Message(p, "%HReloads the IRCBot. FOR EMERGENCIES ONLY!");
}
}
}

View File

@ -33,7 +33,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p)
{
Player.Message(p, "/restart - Restarts the server! Use carefully!");
Player.Message(p, "%T/restart");
Player.Message(p, "%HRestarts the server! Use carefully!");
}
}
}

View File

@ -20,18 +20,16 @@
using System;
using System.IO;
using System.Threading;
namespace MCGalaxy.Commands
{
public sealed class CmdShutdown : Command
{
namespace MCGalaxy.Commands {
public sealed class CmdShutdown : Command {
public override string name { get { return "shutdown"; } }
public override string shortcut { get { return ""; } }
public override string type { get { return CommandTypes.Moderation; } }
public override string type { get { return CommandTypes.Moderation; } }
public override bool museumUsable { get { return true; } }
public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
public override void Help(Player p) { Player.Message(p, "/shutdown [time] [message] - Shuts the server down"); }
public override void Use(Player p, string message)
{
public override void Use(Player p, string message) {
int secTime = 10;
bool shutdown = true;
string file = "stopShutdown";
@ -65,7 +63,11 @@ namespace MCGalaxy.Commands
if (!File.Exists(file)) { MCGalaxy.Gui.App.ExitProgram(false); return; }
else { File.Delete(file); Player.GlobalMessage("Shutdown cancelled"); Server.s.Log("Shutdown cancelled"); return; }
}
return;
}
public override void Help(Player p) {
Player.Message(p, "%T/shutdown [time] [message]");
Player.Message(p, "%HShuts the server down");
}
}
}

View File

@ -71,9 +71,9 @@ namespace MCGalaxy.Commands.Moderation {
}
public override void Help(Player p) {
Player.Message(p, "/tempban <name> <minutes> [reason] - Bans <name> for <minutes>");
Player.Message(p, "Max time is 1440 (1 day). Default is 60");
Player.Message(p, "Temp bans will reset on server restart");
Player.Message(p, "%T/tempban <name> <minutes> [reason]");
Player.Message(p, "%HBans <name> for <minutes>. Max time is 1440 (1 day). Default is 60");
Player.Message(p, "%HTemp bans will reset on server restart");
}
}
}

View File

@ -37,7 +37,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/trust <name> - Turns off the anti-grief for <name>");
Player.Message(p, "%T/trust <name>");
Player.Message(p, "%HTurns off the anti-grief for <name>");
}
}
}

View File

@ -103,9 +103,10 @@ namespace MCGalaxy.Commands {
struct CatchPos { public ushort x, y, z; public string message; public long seconds; }
public override void Help(Player p) {
Player.Message(p, "/undoarea [player] [seconds] - Undoes the blockchanges made by [player] in the previous [seconds].");
Player.Message(p, "%T/undoarea [player] [seconds]");
Player.Message(p, "%HUndoes the blockchanges made by [player] in the previous [seconds] in a specific area.");
if (p == null || (p.group.maxUndo <= 500000 || p.group.maxUndo == 0))
Player.Message(p, "/undoarea [player] all - &cUndoes 68 years for [player]");
Player.Message(p, "%T/undoarea [player] all %H- Undoes 68 years for [player]");
}
}
}

View File

@ -72,11 +72,12 @@ namespace MCGalaxy.Commands {
static string Name(Player pl, string name) { return pl == null ? name : pl.ColoredName; }
public override void Help(Player p) {
Player.Message(p, "VIPs are players who can join regardless of the player limit.");
Player.Message(p, "/vip add <name> - Add a VIP.");
Player.Message(p, "/vip remove <name> - Remove a VIP.");
Player.Message(p, "/vip list - List all VIPs.");
public override void Help(Player p) {
Player.Message(p, "%T/vip <add/remove> [player]");
Player.Message(p, "%HAdds or removes [player] from the VIP list.");
Player.Message(p, "%T/vip list");
Player.Message(p, "%HLists all players who are on the VIP list.");
Player.Message(p, "%H VIPs can join regardless of the player limit.");
}
}
}

View File

@ -98,7 +98,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p)
{
Player.Message(p, "/votekick <player> - Calls a 30sec vote to kick <player>");
Player.Message(p, "%T/votekick <player>");
Player.Message(p, "%HCalls a 30sec vote to kick <player>");
}
}
}

View File

@ -70,8 +70,8 @@ namespace MCGalaxy.Commands.Moderation {
}
public override void Help(Player p) {
Player.Message(p, "/warn <player> <reason> - Warns a player.");
Player.Message(p, "Player will get kicked after 3 warnings.");
Player.Message(p, "%T/warn <player> <reason>");
Player.Message(p, "%HWarns a player. Players are kicked after 3 warnings.");
}
}
}

View File

@ -61,7 +61,10 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/whitelist <add/del/list> [player] - Handles whitelist entry for [player], or lists all entries.");
Player.Message(p, "%T/whitelist <add/del> [player]");
Player.Message(p, "%HAdds or removes [player] from the whitelist.");
Player.Message(p, "%T/whitelist list");
Player.Message(p, "%HLists all players who are on the whitelist.");
}
}
}

View File

@ -37,7 +37,8 @@ namespace MCGalaxy.Commands.Moderation {
}
public override void Help(Player p) {
Player.Message(p, "/xban [name] [message]- Bans, IP bans, undoes, and kicks [name] with [message], if specified.");
Player.Message(p, "%T/xban [name] [message]");
Player.Message(p, "%HBans, IP bans, undoes, and kicks [name] with [message], if specified.");
}
}
}

View File

@ -61,7 +61,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/xmute <player> <seconds> - Mutes <player> for <seconds> seconds");
Player.Message(p, "%T/xmute <player> <seconds>");
Player.Message(p, "%HMutes <player> for <seconds> seconds");
}
}
}

View File

@ -55,8 +55,9 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/cmdcreate <message> - Creates a dummy command class named Cmd<Message> from which you can make a new command.");
Player.Message(p, "Or use \"/cmdcreate <name of command> vb\" to create a dummy class in visual basic");
Player.Message(p, "%T/cmdcreate <message>");
Player.Message(p, "%HCreates a dummy command class named Cmd<Message> from which you can make a new command.");
Player.Message(p, "%HOr use \"/cmdcreate <name of command> vb\" to create a dummy class in visual basic");
}
}
}

View File

@ -38,8 +38,9 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/cmdload <command> - Loads a compiled command into the server for use.");
Player.Message(p, "This method load both C# and Visual Basic compiled commands.");
Player.Message(p, "%T/cmdload <command>");
Player.Message(p, "%HLoads a compiled command into the server for use.");
Player.Message(p, "%HThis method load both C# and Visual Basic compiled commands.");
}
}
}

View File

@ -47,7 +47,8 @@ namespace MCGalaxy.Commands
public override void Help(Player p)
{
Player.Message(p, "/cmdunload <command> - Unloads a command from the server.");
Player.Message(p, "%T/cmdunload <command>");
Player.Message(p, "%HUnloads a command from the server.");
}
}
}

View File

@ -59,9 +59,11 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/compile <class name> - Compiles a command class file into a DLL.");
Player.Message(p, "/compile <class name> vb - Compiles a command class (that was written in visual basic) file into a DLL.");
Player.Message(p, "class name: &9Cmd&e<class name>&9.cs");
Player.Message(p, "%T/compile <class name>");
Player.Message(p, "%HCompiles a command class file into a DLL.");
Player.Message(p, "%T/compile <class name> vb");
Player.Message(p, "%HCompiles a command class (that was written in visual basic) file into a DLL.");
Player.Message(p, "%H class name: &9Cmd&e<class name>&9.cs");
}
}
}

View File

@ -43,8 +43,10 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/compload <command> - Compiles and loads a C# command into the server for use.");
Player.Message(p, "/compload <command> vb - Compiles and loads a Visual basic command into the server for use.");
Player.Message(p, "%T/compload <command>");
Player.Message(p, "%HCompiles and loads a C# command into the server for use.");
Player.Message(p, "%T/compload <command> vb");
Player.Message(p, "%HCompiles and loads a Visual basic command into the server for use.");
}
}
}

View File

@ -61,7 +61,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/pcreate <Plugin name> - Create a example .cs file!");
Player.Message(p, "%T/pcreate <Plugin name>");
Player.Message(p, "%HCreate a example .cs file!");
}
}
}

View File

@ -34,7 +34,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p)
{
Player.Message(p, "/pload <filename> - Load a plugin in your plugins folder!");
Player.Message(p, "%T/pload <filename>");
Player.Message(p, "%HLoad a plugin in your plugins folder!");
}
public CmdPLoad() { }
}

View File

@ -34,7 +34,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p)
{
Player.Message(p, "/punload <Plugin name> - Unload a plugin that is loaded");
Player.Message(p, "%T/punload <Plugin name>");
Player.Message(p, "%HUnload a plugin that is loaded");
}
public CmdPUnload() { }
}

View File

@ -160,11 +160,11 @@ namespace MCGalaxy.Commands.World {
}
public override void Help(Player p) {
Player.Message(p, "/fixgrass <type> - Fixes grass based on type");
Player.Message(p, "<type> as \"\": Any grass with something on top is made into dirt, dirt with nothing on top is made grass");
Player.Message(p, "<type> as \"light\": Only dirt/grass in sunlight becomes grass");
Player.Message(p, "<type> as \"grass\": Only turns grass to dirt when under stuff");
Player.Message(p, "<type> as \"dirt\": Only turns dirt with nothing on top to grass");
Player.Message(p, "%T/fixgrass <type> %H- Fixes grass based on type");
Player.Message(p, "%H<type> as \"\": Any grass with something on top is made into dirt, dirt with nothing on top is made grass");
Player.Message(p, "%H<type> as \"light\": Only dirt/grass in sunlight becomes grass");
Player.Message(p, "%H<type> as \"grass\": Only turns grass to dirt when under stuff");
Player.Message(p, "%H<type> as \"dirt\": Only turns dirt with nothing on top to grass");
}
}
}

View File

@ -111,7 +111,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/load <level> <physics> - Loads a level.");
Player.Message(p, "%T/load <level> <physics>");
Player.Message(p, "%HLoads a level.");
}
}
}

View File

@ -52,8 +52,10 @@ namespace MCGalaxy.Commands.World {
}
public override void Help(Player p) {
Player.Message(p, "%T/main %H- Sends you to the main level.");
Player.Message(p, "%T/main [level] %H- Sets the main level to that level.");
Player.Message(p, "%T/main");
Player.Message(p, "%HSends you to the main level.");
Player.Message(p, "%T/main [level]");
Player.Message(p, "%HSets the main level to that level.");
}
}
}

View File

@ -74,8 +74,8 @@ namespace MCGalaxy.Commands.World {
}
public override void Help(Player p) {
Player.Message(p, "/museum <map> <restore> - Allows you to access a restore of the map entered.");
Player.Message(p, "Works on offline maps");
Player.Message(p, "%T/museum <map> <restore>");
Player.Message(p, "%HAllows you to access a restore of the map entered. Works on unloaded maps");
}
}
}

View File

@ -17,13 +17,11 @@
*/
using MCGalaxy.Games;
namespace MCGalaxy.Commands {
public sealed class CmdSpawn : Command {
namespace MCGalaxy.Commands {
public sealed class CmdSpawn : Command {
public override string name { get { return "spawn"; } }
public override string shortcut { get { return ""; } }
public override string type { get { return CommandTypes.Other; } }
public override string type { get { return CommandTypes.World; } }
public override bool museumUsable { get { return true; } }
public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
public CmdSpawn() { }
@ -58,7 +56,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/spawn - Teleports yourself to the spawn location.");
Player.Message(p, "%T/spawn");
Player.Message(p, "%HTeleports you to the spawn location of the level.");
}
}
}

View File

@ -32,8 +32,9 @@ namespace MCGalaxy.Commands.Building {
}
public override void Help(Player p) {
Player.Message(p, "/delete - Deletes any block you click");
Player.Message(p, "\"any block\" meaning door_air, portals, mb's, etc");
Player.Message(p, "%T/delete");
Player.Message(p, "%HDeletes any block you click");
Player.Message(p, "%H\"any block\" meaning door_air, portals, mb's, etc");
}
}
}

View File

@ -100,7 +100,8 @@ namespace MCGalaxy.Commands.Building {
struct CatchPos { public int dist; }
public override void Help(Player p) {
Player.Message(p, "/drill [distance] - Drills a hole, destroying all similar blocks in a 3x3 rectangle ahead of you.");
Player.Message(p, "%T/drill [distance]");
Player.Message(p, "%HDrills a hole, destroying all similar blocks in a 3x3 rectangle ahead of you.");
}
}
}

View File

@ -66,8 +66,10 @@ namespace MCGalaxy.Commands.Building {
}
public override void Help(Player p) {
Player.Message(p, "/hollow - Hollows out an area without flooding it");
Player.Message(p, "/hollow [block] - Hollows around [block]");
Player.Message(p, "%T/hollow");
Player.Message(p, "%HHollows out an area without flooding it");
Player.Message(p, "%T/hollow [block]");
Player.Message(p, "%HHollows around [block]");
}
}
}

View File

@ -141,9 +141,11 @@ namespace MCGalaxy.Commands.Building {
}
public override void Help(Player p) {
Player.Message(p, "/mb [block] [message] - Places a message in your next block.");
Player.Message(p, "Valid blocks: white, black, air, water, lava");
Player.Message(p, "/mb show shows or hides MBs");
Player.Message(p, "%T/mb [block] [message]");
Player.Message(p, "%HPlaces a message in your next block.");
Player.Message(p, "%H Valid blocks: white, black, air, water, lava");
Player.Message(p, "%T/mb show");
Player.Message(p, "%Hshows or hides MBs");
}
}
}

View File

@ -67,10 +67,11 @@ namespace MCGalaxy.Commands.Building {
}
}
}
public override void Help(Player p)
{
Player.Message(p, "/mode [block] - Makes every block placed into [block].");
Player.Message(p, "/[block] also works");
public override void Help(Player p) {
Player.Message(p, "%T/mode [block]");
Player.Message(p, "%HMakes every block placed into [block].");
Player.Message(p, "%H/[block] also works");
}
}
}

View File

@ -34,7 +34,8 @@ namespace MCGalaxy.Commands.Building {
}
public override void Help(Player p) {
Player.Message(p, "/paint - Turns painting mode on/off.");
Player.Message(p, "%T/paint");
Player.Message(p, "%HTurns painting mode on/off.");
}
}
}

View File

@ -63,7 +63,8 @@ namespace MCGalaxy.Commands.Building {
}
public override void Help(Player p) {
Player.Message(p, "/place [block] <x y z> - Places block at your feet or <x y z>");
Player.Message(p, "%T/place [block] <x> <y> <z>");
Player.Message(p, "%HPlaces block at your feet or <x> <y> <z>");
}
}
}

View File

@ -55,7 +55,8 @@ namespace MCGalaxy.Commands.Building {
struct CatchPos { public ushort x, y, z; }
public override void Help(Player p) {
Player.Message(p, "/rainbow - Taste the rainbow");
Player.Message(p, "%T/rainbow");
Player.Message(p, "%HTaste the rainbow");
}
}
}

View File

@ -55,7 +55,8 @@ namespace MCGalaxy.Commands.Building {
}
public override void Help(Player p) {
Player.Message(p, "/redo - Redoes the last /undo or /undo <seconds> you performed.");
Player.Message(p, "%T/redo");
Player.Message(p, "%HRedoes the last /undo or /undo <seconds> you performed.");
}
}
}

View File

@ -106,8 +106,9 @@ namespace MCGalaxy.Commands.Building {
}
public override void Help(Player p) {
Player.Message(p, "/splace [distance] [interval] - Measures a set [distance] and places a stone block at each end.");
Player.Message(p, "Optionally place a block at set [interval] between them.");
Player.Message(p, "%T/splace [distance] [interval]");
Player.Message(p, "%HMeasures a set [distance] and places a stone block at each end.");
Player.Message(p, "%HOptionally place a block at set [interval] between them.");
}
}
}

View File

@ -49,8 +49,9 @@ namespace MCGalaxy.Commands.Building {
}
public override void Help(Player p) {
Player.Message(p, "/static [command] - Makes every command a toggle.");
Player.Message(p, "If [command] is given, then that command is used");
Player.Message(p, "%T/static [command]");
Player.Message(p, "%HMakes every command a toggle.");
Player.Message(p, "%HIf [command] is given, then that command is used");
}
}
}

View File

@ -50,7 +50,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/agree - Agree to the rules when entering the server");
Player.Message(p, "%T/agree");
Player.Message(p, "%HAgree to the rules when entering the server");
}
}
}

View File

@ -62,7 +62,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p)
{
Player.Message(p, "/ascend - Teleports you to the first free space above you.");
Player.Message(p, "%T/ascend");
Player.Message(p, "%HTeleports you to the first free space above you.");
}
}
}

View File

@ -39,7 +39,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p)
{
Player.Message(p, "/back - Takes you back to the position you were in before teleportation");
Player.Message(p, "%T/back");
Player.Message(p, "%HTakes you back to the position you were in before teleportation");
}
}
}

View File

@ -56,7 +56,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/c4 - Place c4!");
Player.Message(p, "%T/c4");
Player.Message(p, "%HPlace c4!");
}
}
}

View File

@ -102,7 +102,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/chain - Shoots a chain of brown mushrooms and grabs a block and brings it back to the start.");
Player.Message(p, "%T/chain");
Player.Message(p, "%HShoots a chain of brown mushrooms and grabs a block and brings it back to the start.");
}
}
}

View File

@ -58,7 +58,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p)
{
Player.Message(p, "/descend - Teleports you to the first free space below you.");
Player.Message(p, "%T/descend");
Player.Message(p, "%HTeleports you to the first free space below you.");
}
}
}

View File

@ -39,7 +39,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/disagree - Disagree to the rules when entering the server");
Player.Message(p, "%T/disagree");
Player.Message(p, "%HDisagree to the rules when entering the server");
}
}
}

View File

@ -96,8 +96,9 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/fly - The old method of flight before custom clients.");
Player.Message(p, "May not work at all depending on your connection.");
Player.Message(p, "%T/fly");
Player.Message(p, "%HThe old method of flight before custom clients.");
Player.Message(p, "%HMay not work at all depending on your connection.");
}
}
}

View File

@ -17,10 +17,8 @@
*/
using System;
namespace MCGalaxy.Commands
{
public sealed class CmdGarbage : Command
{
namespace MCGalaxy.Commands {
public sealed class CmdGarbage : Command {
public override string name { get { return "garbage"; } }
public override string shortcut { get { return ""; } }
public override string type { get { return CommandTypes.Other; } }
@ -28,16 +26,16 @@ namespace MCGalaxy.Commands
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
public CmdGarbage() { }
public override void Use(Player p, string message)
{
public override void Use(Player p, string message) {
Player.Message(p, "Forcing garbage collection...");
GC.Collect();
GC.WaitForPendingFinalizers();
Player.Message(p, "Garbage collection completed!");
}
public override void Help(Player p)
{
Player.Message(p, "/garbage - Forces the .NET garbage collector to run, which releases unused memory. You shouldn't need to use this often.");
public override void Help(Player p) {
Player.Message(p, "%T/garbage");
Player.Message(p, "%HForces the .NET garbage collector to run, which releases unused memory. You shouldn't need to use this often.");
}
}
}

View File

@ -69,7 +69,7 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/hackrank [rank] - Hacks a rank");
Player.Message(p, "%T/hackrank [rank] %H- Hacks a rank");
Player.Message(p, "Available ranks: " + Group.concatList());
}
}

View File

@ -40,7 +40,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/impersonate <player> <message> - Sends a message as if it came from <player>");
Player.Message(p, "%T/impersonate <player> <message>");
Player.Message(p, "%HSends a message as if it came from <player>");
}
}
}

View File

@ -49,8 +49,9 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/invincible [name] - Turns invincible mode on/off.");
Player.Message(p, "If [name] is given, that player's invincibility is toggled");
Player.Message(p, "%T/invincible [name]");
Player.Message(p, "%HTurns invincible mode on/off.");
Player.Message(p, "%HIf [name] is given, that player's invincibility is toggled");
}
}
}

View File

@ -89,7 +89,8 @@ namespace MCGalaxy.Commands
}
public override void Help(Player p) {
Player.Message(p, "/ride - Rides a nearby train.");
Player.Message(p, "%T/ride");
Player.Message(p, "%HRides a nearby train.");
}
}
}

View File

@ -81,9 +81,10 @@ namespace MCGalaxy.Commands
Player.Message(p, "Message sent to &5" + whoTo + ".");
if (who != null) who.SendMessage("Message recieved from &5" + fromname + "%S.");
}
public override void Help(Player p)
{
Player.Message(p, "/send [name] <message> - Sends <message> to [name].");
public override void Help(Player p) {
Player.Message(p, "%T/send [name] <message>");
Player.Message(p, "%HSends <message> to [name].");
}
}
}

View File

@ -47,8 +47,8 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/sendcmd <player> <command> [arguments] - Make another user use a command.");
Player.Message(p, "ex: /sendcmd bob tp bob2");
Player.Message(p, "%T/sendcmd <player> <command> [arguments]");
Player.Message(p, "%HMake another user use a command. (e.g /sendcmd bob tp bob2)");
}
}
}

View File

@ -70,10 +70,10 @@ namespace MCGalaxy.Commands
Player.Message(p, "&c" + message);
}
public override void Help(Player p)
{
Player.Message(p, "/setpass [Password] - Sets your admin password to [password].");
Player.Message(p, "Note: Do NOT set this as your Minecraft password!");
public override void Help(Player p) {
Player.Message(p, "%T/setpass [Password]");
Player.Message(p, "%HSets your admin password to [password].");
Player.Message(p, "%HNote: &cDo NOT set this as your Minecraft password!");
}
}
}

View File

@ -65,10 +65,12 @@ namespace MCGalaxy.Commands
who.SendOwnHeadPos(p.pos[0], p.pos[1], p.pos[2], p.rot[0], 0);
who.SendMessage("You were summoned by " + p.ColoredName + "%S.");
}
public override void Help(Player p)
{
Player.Message(p, "/summon <player> - Summons a player to your position.");
Player.Message(p, "/summon all - Summons all players in the map");
public override void Help(Player p) {
Player.Message(p, "%T/summon <player>");
Player.Message(p, "%HSummons a player to your position.");
Player.Message(p, "%T/summon all");
Player.Message(p, "%HSummons all players in the map");
}
}
}

View File

@ -70,10 +70,11 @@ namespace MCGalaxy.Commands
messageTimer.Start();
}
public override void Help(Player p)
{
Player.Message(p, "/timer [time] [message] - Starts a timer which repeats [message] every 5 seconds.");
Player.Message(p, "Repeats constantly until [time] has passed");
public override void Help(Player p) {
Player.Message(p, "%T/timer [time] [message]");
Player.Message(p, "%HStarts a timer which repeats [message] every 5 seconds.");
Player.Message(p, "%HRepeats constantly until [time] has passed");
}
}
}

View File

@ -73,9 +73,11 @@ namespace MCGalaxy.Commands {
}
public override void Help(Player p) {
Player.Message(p, "/xjail <player> - Mutes <player>, freezes <player> and sends <player> to the XJail map (shortcut = /xj)");
Player.Message(p, "If <player> is already jailed, <player> will be spawned, unfrozen and unmuted");
Player.Message(p, "/xjail set - Sets the map to be used for xjail to your current map and sets jail to current location");
Player.Message(p, "%T/xjail <player>");
Player.Message(p, "%HMutes, freezes, and sends <player> to the XJail map");
Player.Message(p, "%HIf <player> is already jailed, <player> will be spawned, unfrozen and unmuted");
Player.Message(p, "%T/xjail set");
Player.Message(p, "%HSets the xjail map to your current map and sets jail to current location");
}
}
}

View File

@ -348,7 +348,6 @@
<Compile Include="Commands\other\CmdSendCmd.cs" />
<Compile Include="Commands\other\CmdServer.cs" />
<Compile Include="Commands\other\CmdSetPass.cs" />
<Compile Include="Commands\other\CmdSpawn.cs" />
<Compile Include="Commands\other\CmdSummon.cs" />
<Compile Include="Commands\other\CmdTimer.cs" />
<Compile Include="Commands\other\CmdTnt.cs" />
@ -389,6 +388,7 @@
<Compile Include="Commands\World\CmdReload.cs" />
<Compile Include="Commands\World\CmdSave.cs" />
<Compile Include="Commands\World\CmdSetspawn.cs" />
<Compile Include="Commands\World\CmdSpawn.cs" />
<Compile Include="Commands\World\CmdUnflood.cs" />
<Compile Include="Commands\World\CmdUnload.cs" />
<Compile Include="Commands\World\PermissionCmd.cs" />