From e88487d6398862a793ae6f28abbcce476b58e71e Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sun, 4 Jul 2021 16:16:08 +0200 Subject: [PATCH] Update dependencies for 1.17 --- addon/core/pom.xml | 2 +- api/pom.xml | 2 +- .../de/erethon/dungeonsxl/DungeonsXL.java | 21 +++++++++---------- pom.xml | 4 ++-- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/addon/core/pom.xml b/addon/core/pom.xml index d42464a8..24a0fe67 100644 --- a/addon/core/pom.xml +++ b/addon/core/pom.xml @@ -25,7 +25,7 @@ org.spigotmc spigot - ${spigotVersion.latest} + 1.16.5-R0.1-SNAPSHOT provided diff --git a/api/pom.xml b/api/pom.xml index 8704ec40..8d8ae847 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -64,7 +64,7 @@ de.erethon.commons commons-dist - 6.2.2 + 6.2.4 compile diff --git a/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java b/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java index bfdbbd6f..59f8bf05 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java +++ b/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java @@ -118,7 +118,7 @@ public class DungeonsXL extends DREPlugin implements DungeonsAPI { public static final BlockAdapter BLOCK_ADAPTER = Version.isAtLeast(Version.MC1_13) ? new BlockAdapterBlockData() : new BlockAdapterMagicValues(); /* Constants */ - public static final String LATEST_IXL = "1.0"; + public static final String LATEST_IXL = "1.0.1"; public static final String[] EXCLUDED_FILES = {"config.yml", "uid.dat", "DXLData.data", "data"}; /* Folders of internal features */ @@ -236,8 +236,8 @@ public class DungeonsXL extends DREPlugin implements DungeonsAPI { public void onEnable() { super.onEnable(); String ixlVersion = manager.isPluginEnabled("ItemsXL") ? manager.getPlugin("ItemsXL").getDescription().getVersion() : ""; - if (ixlVersion.startsWith("0.")) { - getLogger().log(Level.SEVERE, "DungeonsXL requires ItemsXL v" + LATEST_IXL +" or higher to run."); + if (ixlVersion.startsWith("0.") || ixlVersion.equals("1.0")) { + getLogger().log(Level.SEVERE, "DungeonsXL requires ItemsXL v" + LATEST_IXL + " or higher to run."); manager.disablePlugin(this); return; } @@ -452,15 +452,14 @@ public class DungeonsXL extends DREPlugin implements DungeonsAPI { File backup = new File(DungeonsXL.BACKUPS, resource.getName() + "-" + System.currentTimeMillis() + "_crashbackup"); FileUtil.copyDir(resource, backup); // Remove all files from the backupped resource world but not the config & data that we cannot fetch from the instance. - remove: - for (File remove : FileUtil.getFilesForFolder(resource)) { - for (String nope : DungeonsXL.EXCLUDED_FILES) { - if (remove.getName().equals(nope)) { - continue remove; + remove: for (File remove : FileUtil.getFilesForFolder(resource)) { + for (String nope : DungeonsXL.EXCLUDED_FILES) { + if (remove.getName().equals(nope)) { + continue remove; + } + } + remove.delete(); } - } - remove.delete(); - } DResourceWorld.deleteUnusedFiles(file); FileUtil.copyDir(file, resource, DungeonsXL.EXCLUDED_FILES); } diff --git a/pom.xml b/pom.xml index 93b2a449..2ddf4805 100644 --- a/pom.xml +++ b/pom.xml @@ -21,13 +21,13 @@ UTF-8 1.8 1.8 - 1.16.5-R0.1-SNAPSHOT + 1.17-R0.1-SNAPSHOT de.erethon caliburn - 1.0 + 1.0.1 compile