mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-28 16:07:07 -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) {
|
if (!p.level.worldChat) {
|
||||||
Chat.GlobalChatLevel(p, "<Level>" + p.ColoredName + " %S" + action, false);
|
Chat.GlobalChatLevel(p, "<Level>" + p.ColoredName + " %S" + action, false);
|
||||||
} else {
|
} 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) {
|
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";
|
cmd == "PERVISIT" || cmd == "TEXTURE" || cmd == "BUILDABLE" || cmd == "DELETEABLE";
|
||||||
if (mapOnly && !p.level.name.CaselessStarts(p.name)) {
|
if (mapOnly && !p.level.name.CaselessStarts(p.name)) {
|
||||||
Player.SendMessage(p, "You may only perform that action on your own map.");
|
Player.SendMessage(p, "You may only perform that action on your own map.");
|
||||||
@ -217,6 +217,10 @@ namespace MCGalaxy.Commands
|
|||||||
}
|
}
|
||||||
} else if (cmd == "GUNS") {
|
} else if (cmd == "GUNS") {
|
||||||
Command.all.Find("allowguns").Use(p, "");
|
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") {
|
} else if (cmd == "PERVISIT") {
|
||||||
string rank = value == "" ? Server.defaultRank : value;
|
string rank = value == "" ? Server.defaultRank : value;
|
||||||
Command.all.Find("pervisit").Use(p, rank);
|
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 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 physics -- Sets the physics on your map.");
|
||||||
Player.SendMessage(p, "/os map delete -- Deletes 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 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 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 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");
|
Player.SendMessage(p, "/os map pervisit %b[default is " + Server.defaultRank + "]%S -- Changes the pervisit of you map");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user