mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-26 23:02:04 -04:00
Fix /copylvl and /renamelvl.
This commit is contained in:
parent
0deb3b3dd3
commit
0441e01580
@ -49,7 +49,10 @@ namespace MCGalaxy.Commands
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
File.Move("levels/" + foundLevel.name + ".lvl", "levels/" + newName + ".lvl");
|
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
|
try
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ namespace MCGalaxy.Commands
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
File.Copy("levels/" + msg1 + ".lvl", "levels/" + msg2 + ".lvl");
|
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"))
|
if (File.Exists("blockdefs/lvl_" + msg1 + ".json"))
|
||||||
File.Copy("blockdefs/lvl_" + msg1 + ".json", "blockdefs/lvl_" + msg2 + ".json");
|
File.Copy("blockdefs/lvl_" + msg1 + ".json", "blockdefs/lvl_" + msg2 + ".json");
|
||||||
} catch (System.IO.FileNotFoundException) {
|
} catch (System.IO.FileNotFoundException) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user