Finish dropping Apache Commons Codec

This commit is contained in:
Mike Primm 2021-12-19 15:44:59 -06:00
parent 2d2fe02a81
commit 322a3dd03b
4 changed files with 8 additions and 8 deletions

View File

@ -13,13 +13,13 @@ import net.minecraft.text.LiteralText;
import net.minecraft.text.Text; import net.minecraft.text.Text;
import net.minecraft.util.Util; import net.minecraft.util.Util;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import org.apache.commons.codec.binary.Base64;
import org.dynmap.DynmapLocation; import org.dynmap.DynmapLocation;
import org.dynmap.common.DynmapPlayer; import org.dynmap.common.DynmapPlayer;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.SocketAddress; import java.net.SocketAddress;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.UUID; import java.util.UUID;
/** /**
@ -46,7 +46,7 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
if (textureProperty != null) { if (textureProperty != null) {
DynmapPlugin.TexturesPayload result = null; DynmapPlugin.TexturesPayload result = null;
try { 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); result = GSON.fromJson(json, DynmapPlugin.TexturesPayload.class);
} catch (JsonParseException e) { } catch (JsonParseException e) {
} }

View File

@ -13,13 +13,13 @@ import net.minecraft.text.LiteralText;
import net.minecraft.text.Text; import net.minecraft.text.Text;
import net.minecraft.util.Util; import net.minecraft.util.Util;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import org.apache.commons.codec.binary.Base64;
import org.dynmap.DynmapLocation; import org.dynmap.DynmapLocation;
import org.dynmap.common.DynmapPlayer; import org.dynmap.common.DynmapPlayer;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.SocketAddress; import java.net.SocketAddress;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.UUID; import java.util.UUID;
/** /**
@ -46,7 +46,7 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
if (textureProperty != null) { if (textureProperty != null) {
DynmapPlugin.TexturesPayload result = null; DynmapPlugin.TexturesPayload result = null;
try { 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); result = GSON.fromJson(json, DynmapPlugin.TexturesPayload.class);
} catch (JsonParseException e) { } catch (JsonParseException e) {
} }

View File

@ -13,13 +13,13 @@ import net.minecraft.text.LiteralText;
import net.minecraft.text.Text; import net.minecraft.text.Text;
import net.minecraft.util.Util; import net.minecraft.util.Util;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import org.apache.commons.codec.binary.Base64;
import org.dynmap.DynmapLocation; import org.dynmap.DynmapLocation;
import org.dynmap.common.DynmapPlayer; import org.dynmap.common.DynmapPlayer;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.SocketAddress; import java.net.SocketAddress;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.UUID; import java.util.UUID;
/** /**
@ -46,7 +46,7 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
if (textureProperty != null) { if (textureProperty != null) {
DynmapPlugin.TexturesPayload result = null; DynmapPlugin.TexturesPayload result = null;
try { 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); result = GSON.fromJson(json, DynmapPlugin.TexturesPayload.class);
} catch (JsonParseException e) { } catch (JsonParseException e) {
} }

View File

@ -16,13 +16,13 @@ import net.minecraft.text.LiteralText;
import net.minecraft.text.Text; import net.minecraft.text.Text;
import net.minecraft.util.Util; import net.minecraft.util.Util;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import org.apache.commons.codec.binary.Base64;
import org.dynmap.DynmapLocation; import org.dynmap.DynmapLocation;
import org.dynmap.common.DynmapPlayer; import org.dynmap.common.DynmapPlayer;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.SocketAddress; import java.net.SocketAddress;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.UUID; import java.util.UUID;
/** /**
@ -49,7 +49,7 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
if (textureProperty != null) { if (textureProperty != null) {
DynmapPlugin.TexturesPayload result = null; DynmapPlugin.TexturesPayload result = null;
try { 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); result = GSON.fromJson(json, DynmapPlugin.TexturesPayload.class);
} catch (JsonParseException e) { } catch (JsonParseException e) {
} }