55import java .io .DataInputStream ;
66import java .io .DataOutputStream ;
77import java .io .IOException ;
8-
9- import org .yaml .snakeyaml .external .biz .base64Coder .Base64Coder ;
8+ import java .util .Base64 ;
109
1110import com .comphenix .protocol .wrappers .nbt .NbtBase ;
1211import com .comphenix .protocol .wrappers .nbt .NbtCompound ;
@@ -23,7 +22,7 @@ public class NbtTextSerializer {
2322 * A default instance of this serializer.
2423 */
2524 public static final NbtTextSerializer DEFAULT = new NbtTextSerializer ();
26-
25+
2726 private NbtBinarySerializer binarySerializer ;
2827
2928 public NbtTextSerializer () {
@@ -59,7 +58,7 @@ public <TType> String serialize(NbtBase<TType> value) {
5958 binarySerializer .serialize (value , dataOutput );
6059
6160 // Serialize that array
62- return Base64Coder . encodeLines (outputStream .toByteArray ());
61+ return Base64 . getEncoder (). encodeToString (outputStream .toByteArray ());
6362 }
6463
6564 /**
@@ -70,7 +69,7 @@ public <TType> String serialize(NbtBase<TType> value) {
7069 * @throws IOException If we are unable to parse the input.
7170 */
7271 public <TType > NbtWrapper <TType > deserialize (String input ) throws IOException {
73- ByteArrayInputStream inputStream = new ByteArrayInputStream (Base64Coder . decodeLines (input ));
72+ ByteArrayInputStream inputStream = new ByteArrayInputStream (Base64 . getDecoder (). decode (input ));
7473
7574 return binarySerializer .deserialize (new DataInputStream (inputStream ));
7675 }
0 commit comments