Second Smelt makes use of its own section in Bonus Drops in config.yml

Co-authored-by: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
nossr50
2020-07-13 12:31:30 -07:00
parent 7eae59a0b3
commit fdd951f1f1
176 changed files with 642 additions and 604 deletions

View File

@ -16,9 +16,9 @@ public class CleanBackupsTask extends BukkitRunnable {
@Override
public void run() {
List<Integer> savedDays = new ArrayList<Integer>();
HashMap<Integer, List<Integer>> savedYearsWeeks = new HashMap<Integer, List<Integer>>();
List<File> toDelete = new ArrayList<File>();
List<Integer> savedDays = new ArrayList<>();
HashMap<Integer, List<Integer>> savedYearsWeeks = new HashMap<>();
List<File> toDelete = new ArrayList<>();
int amountTotal = 0;
int amountDeleted = 0;
@ -58,7 +58,7 @@ public class CleanBackupsTask extends BukkitRunnable {
continue;
}
else {
List<Integer> savedWeeks = savedYearsWeeks.computeIfAbsent(year, k -> new ArrayList<Integer>());
List<Integer> savedWeeks = savedYearsWeeks.computeIfAbsent(year, k -> new ArrayList<>());
if (!savedWeeks.contains(weekOfYear) && Config.getInstance().getKeepWeeklyPastMonth()) {
// Keep one backup of each week