mirror of
https://github.com/MinecraftServerControl/mscs.git
synced 2024-11-15 06:48:16 -07:00
fix renaming a world
This commit is contained in:
parent
168454eaa6
commit
12a6994053
6
msctl
6
msctl
@ -2872,9 +2872,11 @@ case "$COMMAND" in
|
|||||||
# Rename the world.
|
# Rename the world.
|
||||||
printf "Renaming Minecraft world: $1"
|
printf "Renaming Minecraft world: $1"
|
||||||
mkdir -p "$WORLDS_LOCATION/$2"
|
mkdir -p "$WORLDS_LOCATION/$2"
|
||||||
mv $WORLDS_LOCATION/$1 $WORLDS_LOCATION/$2
|
mv $WORLDS_LOCATION/$1/* $WORLDS_LOCATION/$2
|
||||||
|
rm -r $WORLDS_LOCATION/$1
|
||||||
if [ -d $WORLDS_LOCATION/$2/$1 ]; then
|
if [ -d $WORLDS_LOCATION/$2/$1 ]; then
|
||||||
mv $WORLDS_LOCATION/$2/$1 $WORLDS_LOCATION/$2/$2
|
mv $WORLDS_LOCATION/$2/$1/* $WORLDS_LOCATION/$2/$2
|
||||||
|
rm -r $WORLDS_LOCATION/$2/$1
|
||||||
fi
|
fi
|
||||||
createWorld "$2" "$PORT" "$IP"
|
createWorld "$2" "$PORT" "$IP"
|
||||||
printf ".\n"
|
printf ".\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user