mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 12:42:22 -04:00
Show special rules that can go in a motd when doing /help map motd. Fixes #312.
This commit is contained in:
parent
ce07eb786f
commit
dfcf1691ff
@ -142,11 +142,26 @@ namespace MCGalaxy.Commands.World {
|
||||
if (!help.Key.CaselessEq(opt)) continue;
|
||||
Player.Message(p, "%T/map [level] {0}{1}", opt, Suffix(opt));
|
||||
Player.Message(p, "%H" + help.Value);
|
||||
|
||||
if (help.Key.CaselessEq("motd")) ShowMotdRules(p);
|
||||
return;
|
||||
}
|
||||
Player.Message(p, "Unrecognised option \"{0}\".", opt);
|
||||
}
|
||||
|
||||
static void ShowMotdRules(Player p) {
|
||||
Player.Message(p, "%HSpecial rules that can be put in a motd:");
|
||||
Player.Message(p, "%T-/+hax %H- disallows/allows all hacks");
|
||||
Player.Message(p, "%T-/+fly %H- disallows/allows flying");
|
||||
Player.Message(p, "%T-/+noclip %H- disallows/allows noclipping");
|
||||
Player.Message(p, "%T-/+respawn %H- disallows/allows respawning");
|
||||
Player.Message(p, "%T-/+speed %H- disallows/allows speeding");
|
||||
Player.Message(p, "%T-/+ophax %H- disallows/allows hacks for {0}%S+",
|
||||
Group.GetColoredName(LevelPermission.Operator));
|
||||
Player.Message(p, "%Tjumpheight=[height] %H- sets max height users can jump up to");
|
||||
Player.Message(p, "%Thorspeed=[speed] %H- sets max speed users can move at, when speeding is disallowed");
|
||||
}
|
||||
|
||||
static string Suffix(string opt) {
|
||||
if (opt == "motd") return " <value>";
|
||||
return HasArgument(opt) ? " [value]" : "";
|
||||
|
@ -55,7 +55,7 @@ namespace MCGalaxy {
|
||||
};
|
||||
|
||||
public static Dictionary<string, string> Help = new Dictionary<string, string>() {
|
||||
{ "motd", "%HSets the custom motd for this map. (leave blank to use server default)" },
|
||||
{ "motd", "%HSets the motd for this map. (leave blank to use default motd)" },
|
||||
{ "RealmOwner", "%HSets the players allowed to use /realm on this map." },
|
||||
{ "TreeType", "%HSets the type of trees saplings grow into." },
|
||||
{ "PhysicSpeed", "%HSets the delay (in milliseconds) between physics ticks." },
|
||||
|
Loading…
x
Reference in New Issue
Block a user