From b858b0ff5bc18d6a47c9e634efb41745d81f8ab9 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 9 Sep 2017 21:14:39 +1000 Subject: [PATCH] copylvl doesn't require being able to use newlvl anymore, increase copylvl's default perm to superop --- MCGalaxy/Commands/World/CmdCopyLVL.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MCGalaxy/Commands/World/CmdCopyLVL.cs b/MCGalaxy/Commands/World/CmdCopyLVL.cs index d3fa12dba..d980ea469 100644 --- a/MCGalaxy/Commands/World/CmdCopyLVL.cs +++ b/MCGalaxy/Commands/World/CmdCopyLVL.cs @@ -25,7 +25,7 @@ namespace MCGalaxy.Commands.World { public override string name { get { return "CopyLvl"; } } public override string type { get { return CommandTypes.World; } } public override bool museumUsable { get { return true; } } - public override LevelPermission defaultRank { get { return LevelPermission.Operator; } } + public override LevelPermission defaultRank { get { return LevelPermission.Admin; } } public override CommandAlias[] Aliases { get { return new[] { new CommandAlias("WCopy"), new CommandAlias("WorldCopy") }; } } @@ -37,9 +37,6 @@ namespace MCGalaxy.Commands.World { if (args.Length < 2) { Player.Message(p, "You did not specify the destination level name."); return; } - if (p != null && !p.group.CanExecute("newlvl")) { - Player.Message(p, "You cannot use /copylvl as you cannot use /newlvl."); return; - } string src = args[0]; src = Matcher.FindMaps(p, src); @@ -52,10 +49,13 @@ namespace MCGalaxy.Commands.World { try { LevelActions.CopyLevel(src, dst); - } catch (System.IO.IOException) { - Player.Message(p, "The level &c" + dst + " %Salready exists!"); return; + } catch (IOException) { + Player.Message(p, "Level &c" + dst + " %Salready exists!"); return; } - Player.Message(p, "The level &a" + src + " %Shas been copied to &a" + dst + "."); + + Level ignored; + LevelConfig cfg = LevelInfo.GetConfig(src, out ignored); + Player.Message(p, "Level {0} %Shas been copied to {1}", cfg.Color + src, cfg.Color + dst); } public override void Help(Player p) {