From b01d22e4c87227e35ce1fc3c85cae682e0d9a5c1 Mon Sep 17 00:00:00 2001 From: Szum123321 Date: Sun, 19 Apr 2020 10:40:28 +0200 Subject: [PATCH] Few final tweaks. Everything seems to be working alright. --- ...pyright_Notice.txt => Copyright_Notice.txt | 0 gradle.properties | 2 +- .../textile_backup/ConfigHandler.java | 34 +++++++++---------- .../compressors/ParallelZipCompressor.java | 1 - 4 files changed, 18 insertions(+), 19 deletions(-) rename src/Copyright_Notice.txt => Copyright_Notice.txt (100%) diff --git a/src/Copyright_Notice.txt b/Copyright_Notice.txt similarity index 100% rename from src/Copyright_Notice.txt rename to Copyright_Notice.txt diff --git a/gradle.properties b/gradle.properties index 3d44dd5..f9cf201 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,6 +9,6 @@ loader_version=0.8.2+build.194 fabric_version=0.5.1+build.294-1.15 # Mod Properties -mod_version = 1.2.0S-1.15 +mod_version = 1.2.0-1.15 maven_group = net.szum123321 archives_base_name = textile_backup \ No newline at end of file diff --git a/src/main/java/net/szum123321/textile_backup/ConfigHandler.java b/src/main/java/net/szum123321/textile_backup/ConfigHandler.java index 91a39e1..360fadf 100644 --- a/src/main/java/net/szum123321/textile_backup/ConfigHandler.java +++ b/src/main/java/net/szum123321/textile_backup/ConfigHandler.java @@ -27,60 +27,60 @@ import java.util.Set; @ConfigFile(name = TextileBackup.MOD_ID) public class ConfigHandler { @Comment("\nTime between backups in seconds\n") - public final long backupInterval = 3600; + public long backupInterval = 3600; @Comment("\nShould backups be done even if there is no players?\n") - public final boolean doBackupsOnEmptyServer = false; + public boolean doBackupsOnEmptyServer = false; @Comment("\nShould backups be made on server shutdown\n") - public final boolean shutdownBackup = true; + public boolean shutdownBackup = true; @Comment("\nA path to backup folder\n") - public final String path = "backup/"; + public String path = "backup/"; @Comment("\nThis setting allows you to exclude files form being backuped.\n"+ "Be very careful when setting it, as it is easy to make your backuped world unusable!\n") - public final Set fileBlacklist = new HashSet<>(); + public Set fileBlacklist = new HashSet<>(); @Comment("\nShould every world has its won backup folder?\n") - public final boolean perWorldBackup = false; + public boolean perWorldBackup = false; @Comment("\nMaximum number of backups to keep. If 0 then no backup will be deleted based on its amount\n") - public final int backupsToKeep = 10; + public int backupsToKeep = 10; @Comment("\nMaximum age of backups to keep in seconds.\n if 0 then backups will not be deleted based on its age \n") - public final long maxAge = 0; + public long maxAge = 0; @Comment("\nMaximum size of backup folder in kilo bytes. \n") - public final int maxSize = 0; + public int maxSize = 0; @Comment("\nCompression level \n0 - 9\n Only available for zip compression.\n") - public final int compression = 1; + public int compression = 6; @Comment(value = "\nAvailable formats are:\n" + "ZIP - normal zip archive using standard deflate compression\n" + "GIZP - tar.gz using gzip compression\n" + "BZIP2 - tar.bz2 archive using bzip2 compression\n" + "LZMA - tar.xz using lzma compression\n") - public final ArchiveFormat format = ArchiveFormat.ZIP; + public ArchiveFormat format = ArchiveFormat.ZIP; @Comment("\nPrint info to game out\n") - public final boolean log = true; + public boolean log = true; @Comment("\nMinimal permission level required to run commands\n") - public final int permissionLevel = 4; + public int permissionLevel = 4; @Comment("\nPlayer on singleplayer is always allowed to run command. Warning! On lan party everyone will be allowed to run it.\n") - public final boolean alwaysSingleplayerAllowed = true; + public boolean alwaysSingleplayerAllowed = true; @Comment("\nPlayers allowed to run backup commands without sufficient permission level\n") - public final Set playerWhitelist = new HashSet<>(); + public Set playerWhitelist = new HashSet<>(); @Comment("\nPlayers banned from running backup commands besides their sufficient permission level\n") - public final Set playerBlacklist = new HashSet<>(); + public Set playerBlacklist = new HashSet<>(); @Comment("\nFormat of date&time used to name backup files.\n") - public final String dateTimeFormat = "dd.MM.yyyy_HH-mm-ss"; + public String dateTimeFormat = "dd.MM.yyyy_HH-mm-ss"; public enum ArchiveFormat { ZIP(".zip"), diff --git a/src/main/java/net/szum123321/textile_backup/core/compressors/ParallelZipCompressor.java b/src/main/java/net/szum123321/textile_backup/core/compressors/ParallelZipCompressor.java index 11a8ae5..29c48c6 100644 --- a/src/main/java/net/szum123321/textile_backup/core/compressors/ParallelZipCompressor.java +++ b/src/main/java/net/szum123321/textile_backup/core/compressors/ParallelZipCompressor.java @@ -72,7 +72,6 @@ public class ParallelZipCompressor { public InputStream get() { try { - System.out.println("Creating: " + sourceFile); stream = Files.newInputStream(sourceFile); } catch (IOException e) { e.printStackTrace();