parent
b24c807a3a
commit
5de9c9ba0c
|
@ -87,10 +87,11 @@ public class TextileBackup implements ModInitializer {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
).then(BlacklistCommand.register())
|
||||
.then(CleanupCommand.register())
|
||||
)
|
||||
.then(StartBackupCommand.register())
|
||||
.then(CleanupCommand.register())
|
||||
.then(WhitelistCommand.register())
|
||||
.then(BlacklistCommand.register())
|
||||
.then(RestoreBackupCommand.register())
|
||||
.then(ListBackupsCommand.register())
|
||||
.then(KillRestoreCommand.register())
|
||||
|
|
|
@ -113,7 +113,6 @@ public class CustomLogger {
|
|||
|
||||
public void sendInfo(ServerCommandSource source, String msg, Object... args) {
|
||||
sendToPlayer(Level.INFO, source, msg, args);
|
||||
info(msg, args);
|
||||
}
|
||||
|
||||
public void sendError(ServerCommandSource source, String msg, Object... args) {
|
||||
|
|
|
@ -52,6 +52,7 @@ public class BackupHelper {
|
|||
|
||||
if (ctx.shouldSave()) {
|
||||
Statics.LOGGER.sendInfo(ctx.getCommandSource(), "Saving server...");
|
||||
Statics.LOGGER.info( "Saving server...");
|
||||
ctx.getServer().save(true, true, false);
|
||||
}
|
||||
|
||||
|
@ -111,6 +112,7 @@ public class BackupHelper {
|
|||
if(f != Statics.untouchableFile) {
|
||||
if(f.delete()) {
|
||||
Statics.LOGGER.sendInfo(ctx, "Deleting: {}", f.getName());
|
||||
Statics.LOGGER.info("Deleting: {}", f.getName());
|
||||
return true;
|
||||
} else {
|
||||
Statics.LOGGER.sendError(ctx, "Something went wrong while deleting: {}.", f.getName());
|
||||
|
@ -119,6 +121,4 @@ public class BackupHelper {
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean isFileOk(File f) {return f.exists() && f.isFile(); }
|
||||
}
|
|
@ -36,6 +36,7 @@ public class MakeBackupRunnable implements Runnable {
|
|||
@Override
|
||||
public void run() {
|
||||
Statics.LOGGER.sendInfo(context.getCommandSource(), "Starting backup");
|
||||
Statics.LOGGER.info("Starting backup");
|
||||
|
||||
File world = Utilities.getWorldFolder(context.getServer());
|
||||
|
||||
|
@ -98,6 +99,7 @@ public class MakeBackupRunnable implements Runnable {
|
|||
BackupHelper.executeFileLimit(context.getCommandSource(), Utilities.getLevelName(context.getServer()));
|
||||
|
||||
Statics.LOGGER.sendInfo(context, "Done!");
|
||||
Statics.LOGGER.info("Done!");
|
||||
}
|
||||
|
||||
private String getFileName(){
|
||||
|
|
Loading…
Reference in New Issue