From 94b392dd395c4cfdf79b8c28c768da7c9dce2f6b Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Tue, 21 Dec 2021 19:00:59 +0100 Subject: [PATCH] refactor: Address a few `TODO 1.18`'s (cherry picked from commit 0b77932b6e46c825d78b8c7ccae2a68ad890564e) --- .../src/main/java/com/fastasyncworldedit/core/Fawe.java | 3 +-- .../java/com/fastasyncworldedit/core/util/TextureUtil.java | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/Fawe.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/Fawe.java index 46f934d4a..4cea8e2cb 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/Fawe.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/Fawe.java @@ -305,8 +305,7 @@ public class Fawe { br.close(); this.version = FaweVersion.tryParse(versionString, commitString, dateString); Settings.IMP.DATE = new Date(100 + version.year, version.month, version.day).toString(); - //TODO 1.18 revisit - Settings.IMP.BUILD = "https://ci.athion.net/job/FastAsyncWorldEdit-1.17/" + version.build; + Settings.IMP.BUILD = "https://ci.athion.net/job/FastAsyncWorldEdit/" + version.build; Settings.IMP.COMMIT = "https://github.com/IntellectualSites/FastAsyncWorldEdit/commit/" + Integer.toHexString(version.hash); } catch (Throwable ignored) { } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/TextureUtil.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/TextureUtil.java index 747ed625b..59078cba5 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/TextureUtil.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/TextureUtil.java @@ -33,7 +33,6 @@ import java.io.InputStreamReader; import java.lang.reflect.Type; import java.net.URL; import java.nio.charset.StandardCharsets; -import java.security.AccessControlException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -370,8 +369,7 @@ public class TextureUtil implements TextureHolder { "folder with a `.minecraft/versions` jar in it."); LOGGER.error("If the file exists, please make sure the server has read access to the directory."); } - //TODO 1.18 AccessControlException is deprecated and scheduled for removal as of Java 17. Exchange on sight to be prepared for future releases - } catch (AccessControlException e) { + } catch (SecurityException e) { LOGGER.error( "Could not download asset jar. It's likely your file permission are setup improperly and do not allow fetching data from the Mojang servers."); LOGGER.error(