Skip to content

Commit 4acdca6

Browse files
committed
fix
1 parent 2b12348 commit 4acdca6

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

settings.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ pluginManagement {
44
gradlePluginPortal()
55
maven("https://maven.fabricmc.net/")
66
maven("https://maven.kikugie.dev/releases/")
7+
maven {
8+
name = "Kikugie Snapshot"
9+
url = uri("https://maven.kikugie.dev/snapshots")
10+
}
711
}
812
}
913

src/main/kotlin/com/github/zly2006/xbackup/Commands.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,12 @@ object Commands {
323323
requires = checkPermission("x_backup.mirror", 0)
324324
executes {
325325
val path = it.source.server.getSavePath(WorldSavePath.ROOT).toAbsolutePath()
326-
doRestore(it.backup(), it, path)
326+
doRestore(it.backup(), it, path, forceStop = true)
327327
1
328328
}
329-
literal("--stop").executes {
329+
literal("--restart").executes {
330330
val path = it.source.server.getSavePath(WorldSavePath.ROOT).toAbsolutePath()
331-
doRestore(it.backup(), it, path, forceStop = true)
331+
doRestore(it.backup(), it, path, forceStop = false)
332332
1
333333
}
334334
}
@@ -432,7 +432,7 @@ object Commands {
432432
XBackup.log.info("[X Backup] Restoring block range: $minX-$minZ, $maxX-$maxZ")
433433
XBackup.log.info("mca: r.${minX shr 9}.${minZ shr 9}.mca to r.${maxX shr 9}.${maxZ shr 9}.mca")
434434
XBackup.log.info("mcc: r.${minX shr 4}.${minZ shr 4}.mcc to r.${maxX shr 4}.${maxZ shr 4}.mcc")
435-
doRestore(backup, it, path) {
435+
doRestore(backup, it, path, forceStop = true) {
436436
val p = path.resolve(it).normalize()
437437
if (!Utils.isFileInWorld(world, p)) {
438438
XBackup.log.debug("[X Backup] {} is not in world {}, skipping", p, world)
@@ -464,11 +464,11 @@ object Commands {
464464
}
465465
}
466466
}
467-
literal("--stop").executes {
467+
literal("--restart").executes {
468468
val id = IntegerArgumentType.getInteger(it, "id")
469469
val path = it.source.server.getSavePath(WorldSavePath.ROOT).toAbsolutePath()
470470
val backup = getBackup(id)
471-
doRestore(backup, it, path, forceStop = true)
471+
doRestore(backup, it, path, forceStop = false)
472472
1
473473
}
474474
literal("--force") {
@@ -477,15 +477,15 @@ object Commands {
477477
val id = IntegerArgumentType.getInteger(it, "id")
478478
val path = it.source.server.getSavePath(WorldSavePath.ROOT).toAbsolutePath()
479479
val backup = getBackup(id)
480-
doRestore(backup, it, path, recheck = false)
480+
doRestore(backup, it, path, recheck = false, forceStop = true)
481481
1
482482
}
483483
}
484484
}.executes {
485485
val id = IntegerArgumentType.getInteger(it, "id")
486486
val path = it.source.server.getSavePath(WorldSavePath.ROOT).toAbsolutePath()
487487
val backup = getBackup(id)
488-
doRestore(backup, it, path)
488+
doRestore(backup, it, path, forceStop = true)
489489
1
490490
}
491491
}

0 commit comments

Comments
 (0)