diff --git a/build.gradle b/build.gradle index 531541017..02b1f880a 100644 --- a/build.gradle +++ b/build.gradle @@ -9,13 +9,12 @@ sourceCompatibility = 1.8 repositories { mavenCentral() - maven { url 'https://jitpack.io' } } dependencies { compile 'io.netty:netty-all:4.1.27.Final' compile 'com.google.guava:guava:25.1-jre' compile 'com.google.code.gson:gson:2.8.5' - compile 'com.github.KyoriPowered:text:v1.12-1.5.0' + compile 'net.kyori:text:1.12-1.5.0' testCompile group: 'junit', name: 'junit', version: '4.12' } diff --git a/src/main/java/io/minimum/minecraft/velocity/protocol/netty/LegacyPingEncoder.java b/src/main/java/io/minimum/minecraft/velocity/protocol/netty/LegacyPingEncoder.java index e3cd16f83..313750ecd 100644 --- a/src/main/java/io/minimum/minecraft/velocity/protocol/netty/LegacyPingEncoder.java +++ b/src/main/java/io/minimum/minecraft/velocity/protocol/netty/LegacyPingEncoder.java @@ -16,9 +16,8 @@ public class LegacyPingEncoder extends MessageToByteEncoder protected void encode(ChannelHandlerContext ctx, LegacyPingResponse msg, ByteBuf out) throws Exception { out.writeByte(0xff); String serializedResponse = serialize(msg); - byte[] serializedBytes = serializedResponse.getBytes(StandardCharsets.UTF_16BE); - out.writeShort(serializedBytes.length); - out.writeBytes(serializedBytes); + out.writeShort(serializedResponse.length()); + out.writeBytes(serializedResponse.getBytes(StandardCharsets.UTF_16BE)); System.out.println(ByteBufUtil.prettyHexDump(out)); }