From d7aa8b0cab9371781babf670d2e72f18fb173d86 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Mon, 9 Mar 2020 14:18:12 +1100 Subject: [PATCH] Make /copylvl,/renamelvl,/deletelvl consistently announce globally and be consistent in messaging --- MCGalaxy/Commands/World/CmdCopyLVL.cs | 2 +- MCGalaxy/Commands/World/CmdDeleteLvl.cs | 5 ++++- MCGalaxy/Commands/World/CmdRenameLvl.cs | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/MCGalaxy/Commands/World/CmdCopyLVL.cs b/MCGalaxy/Commands/World/CmdCopyLVL.cs index 7e58d442e..08085c464 100644 --- a/MCGalaxy/Commands/World/CmdCopyLVL.cs +++ b/MCGalaxy/Commands/World/CmdCopyLVL.cs @@ -47,7 +47,7 @@ namespace MCGalaxy.Commands.World { if (!LevelActions.Copy(p, src, dst)) return; Level ignored; LevelConfig cfg = LevelInfo.GetConfig(src, out ignored); - p.Message("Level {0} %Shas been copied to {1}", cfg.Color + src, cfg.Color + dst); + Chat.MessageGlobal("Map {0} %Swas copied to {1}", cfg.Color + src, cfg.Color + dst); } public override void Help(Player p) { diff --git a/MCGalaxy/Commands/World/CmdDeleteLvl.cs b/MCGalaxy/Commands/World/CmdDeleteLvl.cs index dd59415dd..72818432a 100644 --- a/MCGalaxy/Commands/World/CmdDeleteLvl.cs +++ b/MCGalaxy/Commands/World/CmdDeleteLvl.cs @@ -36,7 +36,10 @@ namespace MCGalaxy.Commands.World { if (map == null) return; if (!LevelInfo.Check(p, data.Rank, map, "delete this map")) return; - LevelActions.Delete(p, map); + Level ignored; + LevelConfig cfg = LevelInfo.GetConfig(map, out ignored); + if (!LevelActions.Delete(p, map)) return; + Chat.MessageGlobal("Map {0} %Swas deleted", cfg.Color + map); } public override void Help(Player p) { diff --git a/MCGalaxy/Commands/World/CmdRenameLvl.cs b/MCGalaxy/Commands/World/CmdRenameLvl.cs index 2119fc539..49aca1d4d 100644 --- a/MCGalaxy/Commands/World/CmdRenameLvl.cs +++ b/MCGalaxy/Commands/World/CmdRenameLvl.cs @@ -41,8 +41,8 @@ namespace MCGalaxy.Commands.World { if (!LevelActions.Rename(p, src, dst)) return; Level ignored; - LevelConfig cfg = LevelInfo.GetConfig(src, out ignored); - Chat.MessageGlobal("Renamed {0} %Sto {1}", cfg.Color + src, cfg.Color + dst); + LevelConfig cfg = LevelInfo.GetConfig(dst, out ignored); + Chat.MessageGlobal("Map {0} %Swas renamed to {1}", cfg.Color + src, cfg.Color + dst); } public override void Help(Player p) {