From 7a588408215e63171011a3c07b15974757d5694e Mon Sep 17 00:00:00 2001 From: AJ Ferguson Date: Mon, 2 Dec 2019 14:22:13 -0900 Subject: [PATCH] Fix NoClassDefFoundError in Java 9+ --- .../src/main/java/org/geysermc/connector/utils/Toolbox.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/utils/Toolbox.java b/connector/src/main/java/org/geysermc/connector/utils/Toolbox.java index 806f5e178..3b0d02a28 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/Toolbox.java +++ b/connector/src/main/java/org/geysermc/connector/utils/Toolbox.java @@ -16,7 +16,6 @@ import org.geysermc.connector.network.translators.block.BlockEntry; import org.geysermc.connector.network.translators.item.ItemEntry; import org.geysermc.connector.world.GlobalBlockPalette; -import javax.xml.bind.DatatypeConverter; import java.io.*; import java.util.*; @@ -129,7 +128,7 @@ public class Toolbox { damage = (short)(int) map.get("damage"); } if (map.containsKey("nbt_b64")) { - byte[] bytes = DatatypeConverter.parseBase64Binary((String) map.get("nbt_b64")); + byte[] bytes = Base64.getDecoder().decode((String) map.get("nbt_b64")); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); try { com.nukkitx.nbt.tag.CompoundTag tag = (com.nukkitx.nbt.tag.CompoundTag) NbtUtils.createReaderLE(bais).readTag();