From 08789d8f9fbefd8580d1142eb4900d6336c09ed4 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 10 Sep 2013 20:56:40 +1000 Subject: [PATCH] Write down a supported message type (ByteBuf) when using the ping handler. --- .../main/java/net/md_5/bungee/connection/PingHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/connection/PingHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/PingHandler.java index c339250e2..82a608a88 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/PingHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/PingHandler.java @@ -1,5 +1,7 @@ package net.md_5.bungee.connection; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; import lombok.RequiredArgsConstructor; import net.md_5.bungee.api.Callback; import net.md_5.bungee.api.ServerPing; @@ -14,10 +16,11 @@ public class PingHandler extends PacketHandler private final ServerInfo target; private final Callback callback; - private static final byte[] pingBuf = new byte[] + // TODO: Update this to 1.6.2 style! + private static final ByteBuf pingBuf = Unpooled.wrappedBuffer( new byte[] { (byte) 0xFE, (byte) 0x01 - }; + } ); @Override public void connected(ChannelWrapper channel) throws Exception