Make BackupScheduler actually work + typo
This commit is contained in:
parent
888d56c3bb
commit
5dd25ce192
@ -44,7 +44,7 @@ public class TextileBackup implements ModInitializer {
|
||||
public static ConfigHandler config;
|
||||
|
||||
public static final BackupScheduler scheduler = new BackupScheduler();
|
||||
public static final ExecutorService executorSerivece = Executors.newSingleThreadExecutor();
|
||||
public static final ExecutorService executorService = Executors.newSingleThreadExecutor();
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
|
@ -35,7 +35,7 @@ public class StartBackupCommand {
|
||||
}
|
||||
|
||||
private static int executeWithComment(CommandContext<ServerCommandSource> source) {
|
||||
TextileBackup.executorSerivece.submit(
|
||||
TextileBackup.executorService.submit(
|
||||
BackupHelper.create(
|
||||
source.getSource().getMinecraftServer(),
|
||||
source.getSource(),
|
||||
@ -48,7 +48,7 @@ public class StartBackupCommand {
|
||||
}
|
||||
|
||||
private static int execute(ServerCommandSource source){
|
||||
TextileBackup.executorSerivece.submit(
|
||||
TextileBackup.executorService.submit(
|
||||
BackupHelper.create(
|
||||
source.getMinecraftServer(),
|
||||
source,
|
||||
|
@ -22,8 +22,8 @@ public class BackupScheduler {
|
||||
|
||||
if(TextileBackup.config.doBackupsOnEmptyServer || server.getPlayerManager().getCurrentPlayerCount() > 0) {
|
||||
if(scheduled) {
|
||||
if(nextBackup >= now) {
|
||||
TextileBackup.executorSerivece.submit(BackupHelper.create(server, null, true, null));
|
||||
if(nextBackup <= now) {
|
||||
TextileBackup.executorService.submit(BackupHelper.create(server, null, true, null));
|
||||
|
||||
nextBackup = now + TextileBackup.config.backupInterval;
|
||||
}
|
||||
@ -32,8 +32,8 @@ public class BackupScheduler {
|
||||
scheduled = true;
|
||||
}
|
||||
} else if(!TextileBackup.config.doBackupsOnEmptyServer && server.getPlayerManager().getCurrentPlayerCount() == 0) {
|
||||
if(scheduled && nextBackup >= now) {
|
||||
TextileBackup.executorSerivece.submit(BackupHelper.create(server, null, true, null));
|
||||
if(scheduled && nextBackup <= now) {
|
||||
TextileBackup.executorService.submit(BackupHelper.create(server, null, true, null));
|
||||
|
||||
scheduled = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user