diff --git a/src/main/java/serverutils/ServerUtilitiesConfig.java b/src/main/java/serverutils/ServerUtilitiesConfig.java index d006d19e..b15af98e 100644 --- a/src/main/java/serverutils/ServerUtilitiesConfig.java +++ b/src/main/java/serverutils/ServerUtilitiesConfig.java @@ -180,14 +180,15 @@ public static boolean sync() { "max_folder_size", 0, """ - Max size of backup folder in GB. If total folder size exceeds this value it will delete old backups until the size is under. + Max size of backup folder in GB. If total folder size exceeds this value old backups will be deleted until the size is under. 0 = Disabled and backups_to_keep will be used instead.""") .getInt(); backups.delete_custom_name_backups = config.get( BACKUPS, "delete_custom_name_backups", - false, - "Delete backups that have a custom name set through /backup start ").getBoolean(); + true, + "Include backups that have a custom name set through /backup start when deleting old backups") + .getBoolean(); chat.add_nickname_tilde = config.get( CHAT, diff --git a/src/main/java/serverutils/task/backup/BackupTask.java b/src/main/java/serverutils/task/backup/BackupTask.java index 619d07dc..ed117a8e 100644 --- a/src/main/java/serverutils/task/backup/BackupTask.java +++ b/src/main/java/serverutils/task/backup/BackupTask.java @@ -17,6 +17,7 @@ import net.minecraft.command.ICommandSender; import net.minecraft.server.MinecraftServer; import net.minecraft.world.WorldServer; +import net.minecraftforge.common.DimensionManager; import serverutils.ServerUtilities; import serverutils.ServerUtilitiesConfig; @@ -94,7 +95,7 @@ public void execute(Universe universe) { ServerUtilities.LOGGER.info("An error occurred while turning off auto-save.", ex); } - File worldDir = server.getEntityWorld().getSaveHandler().getWorldDirectory(); + File worldDir = DimensionManager.getCurrentSaveRootDirectory(); if (backups.use_separate_thread) { thread = new ThreadBackup(worldDir, customName);