From 1dd661f61907c1acf973c84a6fbf643425ddcb31 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 19 Mar 2013 12:07:13 +1100 Subject: [PATCH] Use a byte array in the ping handler for simplicity --- .../main/java/net/md_5/bungee/connection/PingHandler.java | 6 ++---- 1 file changed, 2 insertions(+), 4 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 3ad97380..9f9ba980 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,7 +1,5 @@ package net.md_5.bungee.connection; -import io.netty.buffer.ByteBuf; -import io.netty.buffer.Unpooled; import io.netty.channel.Channel; import lombok.RequiredArgsConstructor; import net.md_5.bungee.api.Callback; @@ -16,10 +14,10 @@ public class PingHandler extends PacketHandler private final ServerInfo target; private final Callback callback; - private static final ByteBuf pingBuf = Unpooled.wrappedBuffer( new byte[] + private static final byte[] pingBuf = new byte[] { (byte) 0xFE, (byte) 0x01 - } ); + }; @Override public void connected(Channel channel) throws Exception