mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-26 14:54:12 -04:00
Implement /os map chat and /os map restore, closes #154.
This commit is contained in:
parent
c1d6c3ecf8
commit
ac852e5897
@ -60,7 +60,7 @@ namespace MCGalaxy.Commands {
|
||||
if (!p.level.worldChat) {
|
||||
Chat.GlobalChatLevel(p, "<Level>" + p.ColoredName + " %S" + action, false);
|
||||
} else {
|
||||
Player.SendChatFrom(p, p.ColoredName + "%S " + action);
|
||||
Player.SendChatFrom(p, " %S" + action);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ namespace MCGalaxy.Commands
|
||||
}
|
||||
|
||||
void HandleMapCommand(Player p, string message, string cmd, string value) {
|
||||
bool mapOnly = cmd == "PHYSICS" || cmd == "MOTD" || cmd == "GUNS" ||
|
||||
bool mapOnly = cmd == "PHYSICS" || cmd == "MOTD" || cmd == "GUNS" || cmd == "CHAT" || cmd == "RESTORE" ||
|
||||
cmd == "PERVISIT" || cmd == "TEXTURE" || cmd == "BUILDABLE" || cmd == "DELETEABLE";
|
||||
if (mapOnly && !p.level.name.CaselessStarts(p.name)) {
|
||||
Player.SendMessage(p, "You may only perform that action on your own map.");
|
||||
@ -217,6 +217,10 @@ namespace MCGalaxy.Commands
|
||||
}
|
||||
} else if (cmd == "GUNS") {
|
||||
Command.all.Find("allowguns").Use(p, "");
|
||||
} else if (cmd == "CHAT") {
|
||||
Command.all.Find("map").Use(p, "chat");
|
||||
} else if (cmd == "RESTORE") {
|
||||
Command.all.Find("restore").Use(p, value);
|
||||
} else if (cmd == "PERVISIT") {
|
||||
string rank = value == "" ? Server.defaultRank : value;
|
||||
Command.all.Find("pervisit").Use(p, rank);
|
||||
@ -241,7 +245,9 @@ namespace MCGalaxy.Commands
|
||||
Player.SendMessage(p, "/os map add [width] [height] [length] [type] -- Creates your map");
|
||||
Player.SendMessage(p, "/os map physics -- Sets the physics on your map.");
|
||||
Player.SendMessage(p, "/os map delete -- Deletes your map");
|
||||
Player.SendMessage(p, "/os map restore [num] -- Restores backup [num] of your map");
|
||||
Player.SendMessage(p, "/os map save -- Saves your map");
|
||||
Player.SendMessage(p, "/os map chat -- Sets whether roleplay (level only) chat is used.");
|
||||
Player.SendMessage(p, "/os map motd -- Changes the motd of your map");
|
||||
Player.SendMessage(p, "/os map guns -- Toggles if guns can be used on your map");
|
||||
Player.SendMessage(p, "/os map pervisit %b[default is " + Server.defaultRank + "]%S -- Changes the pervisit of you map");
|
||||
|
@ -60,7 +60,7 @@ namespace MCGalaxy.Commands
|
||||
Player.SendMessage(p, "Killer blocks: " + GetBool(lvl.Killer));
|
||||
Player.SendMessage(p, "Unload: " + GetBool(lvl.unload));
|
||||
Player.SendMessage(p, "Load on /goto: " + GetBool(lvl.loadOnGoto));
|
||||
Player.SendMessage(p, "Role play (level only) chat: " + GetBool(!lvl.worldChat));
|
||||
Player.SendMessage(p, "Roleplay (level only) chat: " + GetBool(!lvl.worldChat));
|
||||
Player.SendMessage(p, "Guns: " + GetBool(lvl.guns));
|
||||
Player.SendMessage(p, "Buildable: " + GetBool(lvl.Buildable));
|
||||
Player.SendMessage(p, "Deletable: " + GetBool(lvl.Deletable));
|
||||
@ -120,7 +120,7 @@ namespace MCGalaxy.Commands
|
||||
case "unload":
|
||||
SetBool(p, lvl, ref lvl.unload, "Auto unload: "); break;
|
||||
case "chat":
|
||||
SetBool(p, lvl, ref lvl.worldChat, "Role play (level only) chat: ", true); break;
|
||||
SetBool(p, lvl, ref lvl.worldChat, "Roleplay (level only) chat: ", true); break;
|
||||
case "load":
|
||||
case "autoload":
|
||||
case "loadongoto":
|
||||
|
Loading…
x
Reference in New Issue
Block a user