Commit Graph

249 Commits (2.x_zh_cn_translation)

Author SHA1 Message Date
szymon a8f98c460e Many, many changes:
- I migrated from cotton config to Cloth config + Auto config, that way it's easy to provide modmenu integration while keeping backward-compatibility. Because settings might change at runtime it's now necessary to keep the config reference up-to-date. I done this by using wrapper class around ConfigHolder<> and having a reference to main instance in each class accessing the config.

 - Switched form using one global logger to creating new instance in every class.

 - Removed BackupScheduler from Statics. Why did I put it there in the first place?
2021-06-26 13:10:35 +02:00
szymon fee04a9943 small correction 2021-06-19 18:48:46 +02:00
szymon fcc1dca958 BackupHelper cleanup 2021-06-19 15:39:00 +02:00
szymon 725d4098be Replaced File with Optional<File> in Statics to make sure I won't forget to check if it exists 2021-06-19 14:44:06 +02:00
szymon af8e14f092 Repaired #42 2021-06-19 14:42:22 +02:00
szymon 0a5b5e5c54 Forgot to remove LZMACompressor.java 2021-06-17 22:20:37 +02:00
szymon 78128bc63b Slightly beeter logs 2021-06-17 22:17:55 +02:00
szymon adc14273d0 Java 16 update 2021-06-16 22:42:11 +02:00
szymon 24455d2e5c Last version didn't work with different system languages. This now works but basically depends on a regex 2021-06-14 23:08:56 +02:00
szymon d322f6dc26 Mc version bump 2021-06-13 22:26:17 +02:00
szymon 2ba6ba444c Changed chat message prefix color to match mod's theme. Slightly improved functions notifyPlayer in BackupHelper and RestoreHelper 2021-06-13 22:26:05 +02:00
szymon 95653d066d Added slightly more graceful error handling for THE ISSUE 2021-06-13 21:44:38 +02:00
szymon ab32bd6ead Make it compile and a bit of cleanup 2021-06-13 21:26:57 +02:00
szymon 18e8860f42 1.17 update 2021-06-13 21:25:52 +02:00
szymon f3982d78c0 . 2021-01-02 17:20:56 +01:00
szymon 3c5976f198 Added uncompressed option 2021-01-02 17:20:12 +01:00
szymon c344e01c26 Better CRC32 2020-12-14 13:18:16 +01:00
szymon 927638e0b6 consistency 2020-12-14 12:56:36 +01:00
szymon 09b809de8f Fixed #52 2020-12-13 12:30:58 +01:00
szymon 1b321b7a64 Changed default dateTimeFormat to ISO standard 2020-12-06 22:09:19 +01:00
szymon 7e7280bb82 v 2020-12-06 21:56:23 +01:00
szymon 39d3c3dacd Improved error catching 2020-12-06 21:26:11 +01:00
szymon 8506bef30b Added error catching 2020-12-06 19:19:16 +01:00
szymon 445f7a5613 Some improvements to logging, Player data now gets saved. Few other things... 2020-12-05 23:14:35 +01:00
szymon 7f82664ae7 Added Delete command.
Rearranged command package
2020-12-05 22:17:22 +01:00
szymon d29b9049a4 Typos + missing import 2020-12-02 21:12:58 +01:00
szymon 7e2e399829 Improved RestoreBackupCommand 2020-12-02 21:10:48 +01:00
szymon b68640b37f Added CRC32 calculation to Stored entries in Zip (caused exceptions) 2020-12-02 21:06:46 +01:00
szymon eba22e8464 Added newBackupContextBuilder function to BackupContext.Builder and simplified StartBackupCommand 2020-12-02 21:05:16 +01:00
szymon 06f80a9175 Moved locking world form BackupHelper to MakeBackupRunnable 2020-12-02 21:00:46 +01:00
szymon 163626fb3d Added RestoreContext for good measure 2020-12-02 20:59:47 +01:00
szymon 7c07d2934c Finally no double output! 2020-12-02 20:57:49 +01:00
szymon d27568c20f Renamed BackupInitiator to ActionInitiator and moved it to separate class 2020-12-02 20:49:49 +01:00
szymon 8ba3dbc955 Added comment to isDotDat method 2020-11-30 12:00:29 +01:00
szymon 6f9e98f104 File -> RestoreableFile 2020-11-30 10:35:27 +01:00
szymon 870f133273 Logger.warn -> error 2020-11-30 10:34:48 +01:00
szymon 2de5f4c80b Added missing import, removed duplicate method 2020-11-30 10:34:20 +01:00
szymon 5d7aaf1938 Added some more info to Config 2020-11-30 10:32:58 +01:00
szymon 3b522e2881 Redesign of Compression an archival logic.
Added ZipCompressor
Permanently fixed java.util.concurrent.ExecutionException: java.io.IOException: No space left on device.
2020-11-30 10:32:22 +01:00
szymon a5114b49cc Renamed getFileExtension -> getArchiveExtension
Some stylistic improvements
2020-11-30 10:27:26 +01:00
szymon aac63d45ac Partial redesign of RestoreHelper. It now uses RestoreableFile everywhere.
RestoreableFile is now comparable
2020-11-30 10:25:16 +01:00
szymon 0ef89c2a88 Added missing dot 2020-11-30 10:20:21 +01:00
szymon 335ab845cf Added getPrefix method, changed prefixText from Text to MutableText 2020-11-30 10:19:27 +01:00
szymon 2a211065a3 Solves #48 2020-11-30 10:18:35 +01:00
szymon ead057d916 Added custom thread names 2020-11-30 10:17:39 +01:00
szymon ccd87ee942 Added contributors list 2020-11-30 10:16:34 +01:00
szymon a002d49ecf Automatic world saving is disabled when backup is being made 2020-10-29 12:32:18 +01:00
szymon 38030be54d Typos 2020-10-29 12:30:54 +01:00
szymon 599fdb9a19 Some cleanup and comments... 2020-09-13 20:41:23 +02:00
szymon f7d8a7a854 Send to player also sends responses to the server console 2020-09-13 20:39:33 +02:00
szymon d9aee50cd1 Renamed BackupContext.Builder#setServer -> saveServer 2020-09-13 20:38:58 +02:00
szymon 5de9c9ba0c removed info call from sendInfo method in CustomLogger class 2020-08-15 21:59:11 +02:00
szymon b24c807a3a 1.16.2 update 2020-08-15 10:37:20 +02:00
szymon c5d89ee1ab Version bump 2020-08-14 21:16:45 +02:00
szymon 76c76c7718 Added missing issues link 2020-08-14 21:13:12 +02:00
szymon 1ffcfa6c0e added backup root checking to config checking 2020-08-14 20:38:49 +02:00
szymon 9877fe5c2c Old backups now will be deleted after being restored 2020-08-14 20:37:40 +02:00
szymon 3d4867519c forgot to clean globalShutdownBackupFlag 2020-08-11 20:04:41 +02:00
szymon 9ffa3f0005 MakeBackupRunnable now takes BackupContext instead of separate objects 2020-08-11 09:55:28 +02:00
szymon d215edcec9 Added sendInfo & sendError methods that take BackupContext as argument 2020-08-11 09:54:36 +02:00
szymon d06ab7fe5d Shutdown backup starting code moved to SERVER_STOPPED event 2020-08-11 09:53:55 +02:00
szymon 67fe75667b Decompressors now take File not FileInputStream
GenericTarDecompressor now guesses correct decompressor
2020-08-11 09:52:18 +02:00
szymon 7b6531185d Renamed isValid -> isValidBackup 2020-08-11 09:51:34 +02:00
szymon 786666f827 Some minor improvements to compressors 2020-08-11 09:43:19 +02:00
szymon 1ea2dc2969 Backup Context now can get MinecraftServer for ServerCommandContext 2020-08-11 09:41:46 +02:00
szymon a93e87729b Moved most of the compression code to separate class (AbstractTarCompressor) 2020-08-08 23:36:32 +02:00
szymon 2230f28e97 Statics.LOGGER.sendInfo is now used everywhere instead of source.sendFeedback 2020-08-08 22:19:44 +02:00
szymon 7920152c40 this should make waiting more responsive 2020-08-07 22:29:21 +02:00
szymon c8b53a4ce2 More improvements on restore command 2020-08-07 22:12:25 +02:00
szymon 7301a4be0e * Added findFileAndLockIfPresent method to RestoreHelper
* create method in RestoreHelper return AwaitThread
 * Improved RestoreBackupCommand
2020-08-07 00:06:36 +02:00
szymon c43ae5b19c Added isValid method to Utils BackupHelper cleanup method uses now separated delete method (for logging)
delete method checks if file isn't going to be restored
2020-08-07 00:03:38 +02:00
szymon 5ed0511e7f v + Added defaultDateTimeFormatter to Statics 2020-08-06 23:57:14 +02:00
szymon ac3ff2f78c Utilities shuffled around 2020-08-06 23:55:56 +02:00
szymon ea50da980d Improved list command 2020-08-06 23:53:02 +02:00
szymon e6814c4588 list backups now lists file names without the whole path 2020-08-05 20:35:38 +02:00
szymon 073f01740f kill_r command now logs who called it.
Changed kill_r to killR
2020-08-05 20:34:54 +02:00
szymon b2fe8492d8 RestoreHelper return Runnable 2020-08-05 20:33:31 +02:00
szymon 8da62f4f76 Added missing copyright header 2020-08-05 20:09:16 +02:00
szymon 1856567b17 Improved formatting while sending 2020-08-05 19:33:30 +02:00
szymon 7738e54583 Moved Static variables to separate class (Statics)
Created custom logger (based on ModLogger by Cotton)
Removed info & sendError methods form Utilities (Moved to CustomLogger)
2020-08-05 19:11:06 +02:00
szymon a4fde82b84 Added command for stopping restoration 2020-08-04 23:24:18 +02:00
szymon d28123aacc Moved LivingServer duck interface to core package 2020-08-04 18:00:10 +02:00
szymon 1141c3500a Better java 8 support 2020-08-04 17:32:43 +02:00
szymon abc047c9d6 Config prearrangement + removed option to disable logging. (Why was that there in the first place?) 2020-08-04 17:32:11 +02:00
szymon 695ae7964e Divided command classes into sub-packages 2020-08-04 17:29:45 +02:00
szymon 227faef84c Should work now. Only a ton of testing left... 2020-08-03 23:38:54 +02:00
szymon 7c7c4c7493 It works! (At least now...) 2020-08-03 13:45:24 +02:00
szymon b81b7d27f8 Version bump + ParallelGzipCompressor cleanup 2020-08-02 23:09:46 +02:00
szymon 8f52745cdd Compression time should now look much more useful 2020-08-02 22:33:11 +02:00
szymon 84cc3fdbfc Actually I broke BlockEncoder, but now it works. 2020-08-02 21:56:19 +02:00
szymon a8b8e92187 Cleanup now gives some output. 2020-08-02 20:53:49 +02:00
szymon a1a745abbb Cleanup of Bzip2 compressor files 2020-08-02 20:29:15 +02:00
szymon be3c78e44b Moved compressors form core package to main. 2020-08-02 20:06:53 +02:00
szymon fec162ae24 Added BackupContext. This object gets passed instead of passing ServerCommandSource, MinecraftServer, etc... separately. 2020-08-02 20:05:07 +02:00
szymon f070bfe702 This should make files resistant to modification 2020-08-02 17:56:26 +02:00
szymon 584f03b834 This might repair #32 2020-08-02 11:11:05 +02:00
szymon 2c3c972324 This might repair Zip problems such as #31 2020-08-02 11:09:08 +02:00
szymon 64bc52c77f Repaired #30 2020-07-29 20:05:55 +02:00
szymon 31623906d9 Repaired #29 2020-07-19 12:00:15 +02:00
szymon d81aa65cc6 Version bump 2020-07-19 11:59:17 +02:00
szymon e4f5eb1c88 Added executor service shutdown 2020-07-14 21:38:13 +02:00
szymon 944713beb5 Small optimisation 2020-07-14 21:37:28 +02:00
szymon 5dd25ce192 Make BackupScheduler actually work + typo 2020-07-14 21:36:13 +02:00
szymon 888d56c3bb Added config check 2020-07-14 14:42:46 +02:00
szymon d13bc5256c When backup interval is set to zero, no automatic backups will be performed 2020-07-14 14:41:59 +02:00
szymon 55f5fdf1c4 Thanks to this change if backup was scheduled just before all players left and doBackupsOnEmptyServer = false, than this last backup will still be made. 2020-07-14 14:19:47 +02:00
szymon c07f80b872 Added: new scheduling and execution system.
Todo: testing and cleanup
2020-07-14 14:11:31 +02:00
szymon f5d9947929 This caused time to be shifted by the time zone. 2020-07-09 21:03:30 +02:00
szymon e2102900ed Of course I forgot! 2020-07-09 20:45:05 +02:00
szymon 44fa50f287 Yarn update + typo + version bump 2020-07-09 20:32:43 +02:00
szymon 422d3fcd2f Repaired #22. (Yes, i like streams) 2020-07-09 20:31:04 +02:00
Szum123321 b765b5d467 Opt-in into ModUpdater (https://www.curseforge.com/minecraft/mc-mods/modupdater) 2020-06-30 15:57:53 +02:00
Szum123321 35b120ee21 Logging system redo 2020-06-30 15:54:19 +02:00
Szum123321 92d2d3e2df Updated dependencies
Renamed GenericTarCompressor -> LZMACompressor
2020-06-30 15:52:32 +02:00
Szum123321 3e17a64714 Repaired #20 2020-06-30 15:50:16 +02:00
Szum123321 708659b5dd Few small tweaks. Most lkely final 1.16.1 version. 2020-06-24 20:37:52 +02:00
Szum123321 1fd25e7344 Dependency update. 2020-06-24 20:16:24 +02:00
Szum123321 19d86cc274 1.16-pre2 update. 2020-06-05 16:15:36 +02:00
Szum123321 6590e38c3d Typo 2020-06-05 11:30:11 +02:00
Szum123321 6e6fd951b9 Updated to 20w21a 2020-05-24 13:27:12 +02:00
Szum123321 5f74d33e32 I think i repaired https://github.com/Szum123321/textile_backup/issues/12 2020-05-24 12:44:58 +02:00
Szum123321 5d1bdf5e9e Small tweak. 2020-05-08 23:33:43 +02:00
Szum123321 7e1fe5a602 All is good. 2020-05-08 23:13:34 +02:00
Szum123321 c8c370cec0 20w19a update 2020-05-08 22:35:12 +02:00
Szum123321 b01d22e4c8 Few final tweaks. Everything seems to be working alright. 2020-04-19 10:40:28 +02:00
Szum123321 19349e3775 BZip2 Compression is now also done on multiple threads 2020-04-19 09:17:06 +02:00
Szum123321 e8d9c15625 zip ang zip are now multi threaded 2020-04-18 18:23:24 +02:00
Szum123321 c74fc6c999 Some additional tweaks to the compression system. Also file blacklist works now! 2020-04-17 10:20:47 +02:00
Szum123321 be282adacf Initial version of multiple compression format system. Some more testing still required 2020-04-15 21:02:35 +02:00
Szum123321 226c75eefd typo and some code cleanup 2020-04-03 19:36:04 +02:00
Szum123321 1cb2898173 Added option to not backup files. 2020-04-03 11:26:14 +02:00
Szum123321 7611784d86 now ported to 20w14a 2020-04-03 00:54:11 +02:00
Szum123321 13436baaec Repaired Backups have a "." directory #7, and updated minecraft version. 2020-04-03 00:37:45 +02:00
Szum123321 f8d2a69743 Repaired singeplayer command permission system. 2020-03-24 22:22:26 +01:00
Szum123321 b026c1331a Some code cleanup and repaired mostly whitelist/blacklist commands. pt2 2020-03-24 21:48:04 +01:00
Szum123321 a3ab69a1fe Some code cleanup and repaired mostly whitelist/blacklist commands 2020-03-24 09:25:39 +01:00
Szum123321 312cb57692 Added:
-per world backup
-configurable datetime format
-configurable permission level
-player black and whitelist
2020-03-23 17:42:17 +01:00
Szum123321 b30e35a308 small corrections 2020-03-22 22:06:45 +01:00
Szum123321 5aebbdbf75 Added folder size file limit 2020-03-22 21:54:03 +01:00
Szum123321 a1bb7ed8f3 Added file comment option and ported to 20w12a 2020-03-22 20:10:30 +01:00
szymon f54f5abed2 typo 2020-02-27 19:24:59 +01:00
szymon 0c4a18b4ea Forgot asterisk 2020-02-26 12:39:58 +01:00
szymon 663fba57de Now, both absolute and relative paths are supported. Added license headers 2020-02-26 12:38:10 +01:00
szymon 0b68c2efee 20w06a update 2020-02-11 19:26:16 +01:00
1a2s3d4f1 1e698b9400
Compatible Windows
":" can not write to file name if the system is windows
2020-01-30 08:57:18 +08:00
pm709 7d0bbaf930 Fix NullPointer exception when server stop (ctx is null when BackupHelper.create is called by net.szum123321.textile_backup.mixin.MinecraftServerMixin#onShutdown)
Fix ClassNotFoundException exception for IOUtils class by adding dependency to org.apache.commons:commons-compress:1.8.1
2020-01-29 10:03:28 +01:00
szymon 83503307c8 Small fabric.mod.json and other update 2020-01-25 11:17:16 +01:00
szymon db8d24e541 README.md update 2020-01-25 10:56:08 +01:00
szymon 6c064c1a4d Init 2020-01-25 09:54:58 +01:00