From 322a3dd03bdd9129fbc04d82c6c59d89a3cdbd47 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Sun, 19 Dec 2021 15:44:59 -0600 Subject: [PATCH] Finish dropping Apache Commons Codec --- .../src/main/java/org/dynmap/fabric_1_14_4/FabricPlayer.java | 4 ++-- .../src/main/java/org/dynmap/fabric_1_15_2/FabricPlayer.java | 4 ++-- .../src/main/java/org/dynmap/fabric_1_16_4/FabricPlayer.java | 4 ++-- .../src/main/java/org/dynmap/fabric_1_17_1/FabricPlayer.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fabric-1.14.4/src/main/java/org/dynmap/fabric_1_14_4/FabricPlayer.java b/fabric-1.14.4/src/main/java/org/dynmap/fabric_1_14_4/FabricPlayer.java index 73f29596..8ded1129 100644 --- a/fabric-1.14.4/src/main/java/org/dynmap/fabric_1_14_4/FabricPlayer.java +++ b/fabric-1.14.4/src/main/java/org/dynmap/fabric_1_14_4/FabricPlayer.java @@ -13,13 +13,13 @@ import net.minecraft.text.LiteralText; import net.minecraft.text.Text; import net.minecraft.util.Util; import net.minecraft.util.math.Vec3d; -import org.apache.commons.codec.binary.Base64; import org.dynmap.DynmapLocation; import org.dynmap.common.DynmapPlayer; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.nio.charset.StandardCharsets; +import java.util.Base64; import java.util.UUID; /** @@ -46,7 +46,7 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer { if (textureProperty != null) { DynmapPlugin.TexturesPayload result = null; try { - String json = new String(Base64.decodeBase64(textureProperty.getValue()), StandardCharsets.UTF_8); + String json = new String(Base64.getDecoder().decode(textureProperty.getValue()), StandardCharsets.UTF_8); result = GSON.fromJson(json, DynmapPlugin.TexturesPayload.class); } catch (JsonParseException e) { } diff --git a/fabric-1.15.2/src/main/java/org/dynmap/fabric_1_15_2/FabricPlayer.java b/fabric-1.15.2/src/main/java/org/dynmap/fabric_1_15_2/FabricPlayer.java index c86df552..a1f18092 100644 --- a/fabric-1.15.2/src/main/java/org/dynmap/fabric_1_15_2/FabricPlayer.java +++ b/fabric-1.15.2/src/main/java/org/dynmap/fabric_1_15_2/FabricPlayer.java @@ -13,13 +13,13 @@ import net.minecraft.text.LiteralText; import net.minecraft.text.Text; import net.minecraft.util.Util; import net.minecraft.util.math.Vec3d; -import org.apache.commons.codec.binary.Base64; import org.dynmap.DynmapLocation; import org.dynmap.common.DynmapPlayer; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.nio.charset.StandardCharsets; +import java.util.Base64; import java.util.UUID; /** @@ -46,7 +46,7 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer { if (textureProperty != null) { DynmapPlugin.TexturesPayload result = null; try { - String json = new String(Base64.decodeBase64(textureProperty.getValue()), StandardCharsets.UTF_8); + String json = new String(Base64.getDecoder().decode(textureProperty.getValue()), StandardCharsets.UTF_8); result = GSON.fromJson(json, DynmapPlugin.TexturesPayload.class); } catch (JsonParseException e) { } diff --git a/fabric-1.16.4/src/main/java/org/dynmap/fabric_1_16_4/FabricPlayer.java b/fabric-1.16.4/src/main/java/org/dynmap/fabric_1_16_4/FabricPlayer.java index bb2243c1..16dd4f66 100644 --- a/fabric-1.16.4/src/main/java/org/dynmap/fabric_1_16_4/FabricPlayer.java +++ b/fabric-1.16.4/src/main/java/org/dynmap/fabric_1_16_4/FabricPlayer.java @@ -13,13 +13,13 @@ import net.minecraft.text.LiteralText; import net.minecraft.text.Text; import net.minecraft.util.Util; import net.minecraft.util.math.Vec3d; -import org.apache.commons.codec.binary.Base64; import org.dynmap.DynmapLocation; import org.dynmap.common.DynmapPlayer; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.nio.charset.StandardCharsets; +import java.util.Base64; import java.util.UUID; /** @@ -46,7 +46,7 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer { if (textureProperty != null) { DynmapPlugin.TexturesPayload result = null; try { - String json = new String(Base64.decodeBase64(textureProperty.getValue()), StandardCharsets.UTF_8); + String json = new String(Base64.getDecoder().decode(textureProperty.getValue()), StandardCharsets.UTF_8); result = GSON.fromJson(json, DynmapPlugin.TexturesPayload.class); } catch (JsonParseException e) { } diff --git a/fabric-1.17.1/src/main/java/org/dynmap/fabric_1_17_1/FabricPlayer.java b/fabric-1.17.1/src/main/java/org/dynmap/fabric_1_17_1/FabricPlayer.java index 5b7f963b..18ef187b 100644 --- a/fabric-1.17.1/src/main/java/org/dynmap/fabric_1_17_1/FabricPlayer.java +++ b/fabric-1.17.1/src/main/java/org/dynmap/fabric_1_17_1/FabricPlayer.java @@ -16,13 +16,13 @@ import net.minecraft.text.LiteralText; import net.minecraft.text.Text; import net.minecraft.util.Util; import net.minecraft.util.math.Vec3d; -import org.apache.commons.codec.binary.Base64; import org.dynmap.DynmapLocation; import org.dynmap.common.DynmapPlayer; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.nio.charset.StandardCharsets; +import java.util.Base64; import java.util.UUID; /** @@ -49,7 +49,7 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer { if (textureProperty != null) { DynmapPlugin.TexturesPayload result = null; try { - String json = new String(Base64.decodeBase64(textureProperty.getValue()), StandardCharsets.UTF_8); + String json = new String(Base64.getDecoder().decode(textureProperty.getValue()), StandardCharsets.UTF_8); result = GSON.fromJson(json, DynmapPlugin.TexturesPayload.class); } catch (JsonParseException e) { }