From 2b96cc8445611bd7593c388cc4986f3ba90d6083 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sun, 3 Apr 2016 07:54:51 +1000 Subject: [PATCH] Add /os map buildable and /os map deletable. (Thanks goodlyay) --- Commands/CmdOverseer.cs | 10 ++++++++-- Commands/World/CmdMap.cs | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Commands/CmdOverseer.cs b/Commands/CmdOverseer.cs index 3e61911c3..3c1a9b3e5 100644 --- a/Commands/CmdOverseer.cs +++ b/Commands/CmdOverseer.cs @@ -127,7 +127,7 @@ namespace MCGalaxy.Commands void HandleMapCommand(Player p, string message, string cmd, string value) { bool mapOnly = cmd == "PHYSICS" || cmd == "MOTD" || cmd == "GUNS" || - cmd == "PERVISIT" || cmd == "TEXTURE"; + 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."); return; @@ -222,7 +222,11 @@ namespace MCGalaxy.Commands } else { Command.all.Find("texture").Use(p, "levelzip " + value); } - } else { + } else if (cmd == "BUILDABLE") { + Command.all.Find("map").Use(p, "buildable"); + } else if (cmd == "DELETABLE") { + Command.all.Find("map").Use(p, "deletable"); + } else { Player.SendMessage(p, "/os map add [type - default is flat] -- Creates your map (128x64x128)"); 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."); @@ -233,6 +237,8 @@ namespace MCGalaxy.Commands Player.SendMessage(p, "/os map pervisit %b[default is " + Server.defaultRank + "]%S -- Changes the pervisit of you map"); Player.SendMessage(p, "/os map texture -- Sets terrain.png url for your map"); Player.SendMessage(p, "/os map texturezip -- Sets texture pack .zip url for your map"); + Player.SendMessage(p, "/os map buildable -- Sets whether any blocks can be placed"); + Player.SendMessage(p, "/os map deletable -- Sets whether any blocks can be deleted"); Player.SendMessage(p, " Textures: If your URL is too long, use the \"<\" symbol to continue it on another line."); Player.SendMessage(p, " Map Types: Desert, flat, forest, island, mountians, ocean, pixel, empty and space"); Player.SendMessage(p, " Motd: If no message is provided, the default message will be used."); diff --git a/Commands/World/CmdMap.cs b/Commands/World/CmdMap.cs index 9bbdef106..e68906c66 100644 --- a/Commands/World/CmdMap.cs +++ b/Commands/World/CmdMap.cs @@ -141,7 +141,7 @@ namespace MCGalaxy.Commands SetBool(p, lvl, ref lvl.Buildable, "Buildable: "); lvl.UpdateBlockPermissions(); break; case "deletable": - SetBool(p, lvl, ref lvl.Deletable, "Deleteable: "); + SetBool(p, lvl, ref lvl.Deletable, "Deletable: "); lvl.UpdateBlockPermissions(); break; default: @@ -188,7 +188,7 @@ namespace MCGalaxy.Commands Player.SendMessage(p, "Load on /goto sets whether the map can be loaded when some uses /goto. Only works if the load on /goto server option is enabled."); Player.SendMessage(p, "RP sets whether the physics auto-start for the map"); Player.SendMessage(p, "Buildable sets whether any blocks can be placed by any player"); - Player.SendMessage(p, "Deleteable sets whether any blocks can be deleted by any player"); + Player.SendMessage(p, "Deletable sets whether any blocks can be deleted by any player"); } } }