diff --git a/CHANGELOG.md b/CHANGELOG.md index 212d91198..5da0916a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ * Fixed ChestTerminals deleting items from Cargo networks (TheBusyBiscuit/ChestTerminal#25) * Fixed #1926 * Fixed #1933 +* Fixed random errors because of Mojang's new player heads backend (Why... Mojang... why?) ## Release Candidate 11 (25 Apr 2020) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java index 09420d4fa..f2b9a6845 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java @@ -198,13 +198,8 @@ public final class SlimefunUtils { String base64 = texture; - if (!texture.startsWith("ey")) { - if (PatternUtils.ALPHANUMERIC.matcher(texture).matches()) { - base64 = Base64.getEncoder().encodeToString(("{\"textures\":{\"SKIN\":{\"url\":\"http://textures.minecraft.net/texture/" + texture + "\"}}}").getBytes(StandardCharsets.UTF_8)); - } - else { - throw new IllegalArgumentException("The provided texture (" + texture + ") does not seem to be a valid texture String!"); - } + if (PatternUtils.ALPHANUMERIC.matcher(texture).matches()) { + base64 = Base64.getEncoder().encodeToString(("{\"textures\":{\"SKIN\":{\"url\":\"http://textures.minecraft.net/texture/" + texture + "\"}}}").getBytes(StandardCharsets.UTF_8)); } return SkullItem.fromBase64(base64);