Use a byte array in the ping handler for simplicity

This commit is contained in:
md_5 2013-03-19 12:07:13 +11:00
parent e364cff44e
commit 1dd661f619

View File

@ -1,7 +1,5 @@
package net.md_5.bungee.connection; package net.md_5.bungee.connection;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel; import io.netty.channel.Channel;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import net.md_5.bungee.api.Callback; import net.md_5.bungee.api.Callback;
@ -16,10 +14,10 @@ public class PingHandler extends PacketHandler
private final ServerInfo target; private final ServerInfo target;
private final Callback<ServerPing> callback; private final Callback<ServerPing> callback;
private static final ByteBuf pingBuf = Unpooled.wrappedBuffer( new byte[] private static final byte[] pingBuf = new byte[]
{ {
(byte) 0xFE, (byte) 0x01 (byte) 0xFE, (byte) 0x01
} ); };
@Override @Override
public void connected(Channel channel) throws Exception public void connected(Channel channel) throws Exception