mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-25 14:17:29 -04:00
Fix /copylvl and /renamelvl.
This commit is contained in:
parent
0deb3b3dd3
commit
0441e01580
@ -49,8 +49,11 @@ namespace MCGalaxy.Commands
|
||||
try
|
||||
{
|
||||
File.Move("levels/" + foundLevel.name + ".lvl", "levels/" + newName + ".lvl");
|
||||
File.Move("levels/" + foundLevel.name + ".lvl.backup", "levels/" + newName + ".lvl.backup");
|
||||
|
||||
try
|
||||
{
|
||||
File.Move("levels/" + foundLevel.name + ".lvl.backup", "levels/" + newName + ".lvl.backup");
|
||||
} catch { }
|
||||
|
||||
try
|
||||
{
|
||||
File.Move("levels/level properties/" + foundLevel.name + ".properties", "levels/level properties/" + newName + ".properties");
|
||||
|
@ -59,7 +59,7 @@ namespace MCGalaxy.Commands
|
||||
}
|
||||
try {
|
||||
File.Copy("levels/" + msg1 + ".lvl", "levels/" + msg2 + ".lvl");
|
||||
File.Copy("levels/level properties/" + msg1 + ".properties", "levels/level properties/" + msg1 + ".properties", false);
|
||||
File.Copy("levels/level properties/" + msg1 + ".properties", "levels/level properties/" + msg2 + ".properties", false);
|
||||
if (File.Exists("blockdefs/lvl_" + msg1 + ".json"))
|
||||
File.Copy("blockdefs/lvl_" + msg1 + ".json", "blockdefs/lvl_" + msg2 + ".json");
|
||||
} catch (System.IO.FileNotFoundException) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user