From 91b9679d3df53a78b8ac95f97752d612b57dba94 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Mon, 25 Mar 2024 15:25:07 +0100 Subject: [PATCH] feat: add configs for backups and chunk loader --- config/chunkloaders-common.toml | 38 ++++++++++++++++++++++++++++++++ config/simplebackups-common.toml | 36 ++++++++++++++++++++++++++++++ index.toml | 8 +++++++ pack.toml | 2 +- 4 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 config/chunkloaders-common.toml create mode 100644 config/simplebackups-common.toml diff --git a/config/chunkloaders-common.toml b/config/chunkloaders-common.toml new file mode 100644 index 0000000..2efc966 --- /dev/null +++ b/config/chunkloaders-common.toml @@ -0,0 +1,38 @@ +[Limitations] + # How many chunks should players be able to load per world? Use -1 for infinite. + # Allowed range: -1 ~ 1000 - Default: -1 + maxLoadedChunksPerPlayer = -1 + + # After how many minutes of offline time should players' chunk loaders be disabled? Use -1 to disable the inactivity timeout. + # Allowed range: -1 ~ 525600 - Default: 10080 + inactivityTimeout = 10080 + + # Chunk loaders from before version 1.2.0 are not bound to a player. Should these chunk loaders' loaded chunks stay loaded? + # Allowed values: true, false - Default: true + allowLegacyLoadedChunks = true + + # Can players use the chunk loader map? If false, players will see the message 'The chunk loader map is disabled on this server'. + # Allowed values: true, false - Default: true + canPlayersUseMap = true + +[General] + # In what radius should the Single Chunk Loader be able to load chunks? + # Allowed range: 1 ~ 6 - Default: 1 + singleChunkLoaderRadius = 1 + + # In what radius should the Basic Chunk Loader be able to load chunks? + # Allowed range: 1 ~ 6 - Default: 2 + basicChunkLoaderRadius = 2 + + # In what radius should the Advanced Chunk Loader be able to load chunks? + # Allowed range: 1 ~ 6 - Default: 3 + advancedChunkLoaderRadius = 4 + + # In what radius should the Ultimate Chunk Loader be able to load chunks? + # Allowed range: 1 ~ 6 - Default: 4 + ultimateChunkLoaderRadius = 6 + + # Should chunk loaders do random ticks in loaded chunks? + # Allowed values: true, false - Default: true + doRandomTicks = true + diff --git a/config/simplebackups-common.toml b/config/simplebackups-common.toml new file mode 100644 index 0000000..1606757 --- /dev/null +++ b/config/simplebackups-common.toml @@ -0,0 +1,36 @@ +#If set false, no backups are being made. +enabled = true +#Defines the backup type. +#- FULL_BACKUPS - always creates full backups +#- MODIFIED_SINCE_LAST - only saves the files which changed since last (partial) backup +#- MODIFIED_SINCE_FULL - saves all files which changed after the last full backup +#Allowed Values: FULL_BACKUPS, MODIFIED_SINCE_LAST, MODIFIED_SINCE_FULL +backupType = "MODIFIED_SINCE_LAST" +#How often should a full backup be created if only modified files should be saved? This creates a full backup when x minutes are over and the next backup needs to be done. Once a year is default. +#Range: 1 ~ 10080 +fullBackupTimer = 525960 +#The max amount of backup files to keep. +#Range: 1 ~ 32767 +backupsToKeep = 10 +#The time between two backups in minutes +#5 = each 5 minutes +#60 = each hour +#1440 = each day +#Range: 1 ~ 32767 +timer = 120 +#The compression level, 0 is no compression (less cpu usage) and takes a lot of space, 9 is best compression (most cpu usage) and takes less space. -1 is default +#Range: -1 ~ 9 +compressionLevel = -1 +#Should message be sent when backup is in the making? +sendMessages = true +#The max size of storage the backup folder. If it takes more storage, old files will be deleted. +#Needs to be written as +#Valid storage types: B, KB, MB, GB, TB +maxDiskSize = "25 GB" +#Used to define the output path. +outputPath = "backups" + +[mod_compat] + #Should backup notifications be sent to Discord by using mc2discord? (needs to be installed) + mc2discord = true + diff --git a/index.toml b/index.toml index 092d698..2644cd3 100644 --- a/index.toml +++ b/index.toml @@ -1,5 +1,13 @@ hash-format = "sha256" +[[files]] +file = "config/chunkloaders-common.toml" +hash = "8922b65d3c98bd37d3b0f52c59d3129d85bf505ec69cf02085defba2be1b0d21" + +[[files]] +file = "config/simplebackups-common.toml" +hash = "50f6634d51c2ce851c5f432a6056dcbdfb6f6fb182c7652850f02f82f7f0d878" + [[files]] file = "mods/advanced-generators.pw.toml" hash = "3cc51a51acae9cdd9f0035431db7a203af8e6cc70b21136867796fefc13b74e4" diff --git a/pack.toml b/pack.toml index ba76213..8d29c0b 100644 --- a/pack.toml +++ b/pack.toml @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "00679395f36ee0664da8cebb719af5a06dc1eac103c68dcada9429c398292ec4" +hash = "8a4da25e5692d37cd1040db097290757cb6854cb40865688aec3b0441e359ea0" [versions] minecraft = "1.20.1"