Make /copylvl,/renamelvl,/deletelvl consistently announce globally and be consistent in messaging

This commit is contained in:
UnknownShadow200 2020-03-09 14:18:12 +11:00
parent 63dc19c640
commit d7aa8b0cab
3 changed files with 7 additions and 4 deletions

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {