RestoreHelper return Runnable
This commit is contained in:
parent
8da62f4f76
commit
b2fe8492d8
@ -31,7 +31,7 @@ import java.util.NoSuchElementException;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class RestoreHelper {
|
public class RestoreHelper {
|
||||||
public static Thread create(LocalDateTime backupTime, MinecraftServer server, String comment) {
|
public static Runnable create(LocalDateTime backupTime, MinecraftServer server, String comment) {
|
||||||
File backupFile = Arrays.stream(Utilities.getBackupRootPath(Utilities.getLevelName(server))
|
File backupFile = Arrays.stream(Utilities.getBackupRootPath(Utilities.getLevelName(server))
|
||||||
.listFiles())
|
.listFiles())
|
||||||
.filter(file -> Utilities.getFileCreationTime(file).isPresent())
|
.filter(file -> Utilities.getFileCreationTime(file).isPresent())
|
||||||
@ -44,7 +44,7 @@ public class RestoreHelper {
|
|||||||
|
|
||||||
Statics.globalShutdownBackupFlag.set(false);
|
Statics.globalShutdownBackupFlag.set(false);
|
||||||
|
|
||||||
return new Thread(new RestoreBackupRunnable(server, backupFile, comment));
|
return new RestoreBackupRunnable(server, backupFile, comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<RestoreableFile> getAvailableBackups(MinecraftServer server) {
|
public static List<RestoreableFile> getAvailableBackups(MinecraftServer server) {
|
||||||
|
Loading…
Reference in New Issue
Block a user