diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java b/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java index 1f19d1421..e6fbeefb0 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java @@ -48,7 +48,7 @@ public abstract class DefinedPacket public static byte[] readArray(ByteBuf buf, int limit) { int len = readVarInt( buf ); - Preconditions.checkArgument( len <= limit, "Cannot receive byte array longer than %d (got %s bytes)", limit, len ); + Preconditions.checkArgument( len <= limit, "Cannot receive byte array longer than %s (got %s bytes)", limit, len ); byte[] ret = new byte[ len ]; buf.readBytes( ret ); return ret; diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/EncryptionRequest.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/EncryptionRequest.java index 031144e20..a29524ca8 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/EncryptionRequest.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/EncryptionRequest.java @@ -24,8 +24,8 @@ public class EncryptionRequest extends DefinedPacket public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) { serverId = readString( buf ); - publicKey = readArray( buf, 128 ); - verifyToken = readArray( buf, 128 ); + publicKey = readArray( buf ); + verifyToken = readArray( buf ); } @Override