RestoreHelper return Runnable

This commit is contained in:
szymon 2020-08-05 20:33:31 +02:00
parent 8da62f4f76
commit b2fe8492d8

View File

@ -31,7 +31,7 @@ import java.util.NoSuchElementException;
import java.util.stream.Collectors;
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))
.listFiles())
.filter(file -> Utilities.getFileCreationTime(file).isPresent())
@ -44,7 +44,7 @@ public class RestoreHelper {
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) {