I need to transfer a file from server to client via pluginMessage. For example: /download server.properties It works with small files, but if the file is larger, as I understand it, 8 megabytes, then the packet is not transferred. I came up with the idea of splitting the file transfer into 1KB packets, but I'm a little confused about the implementation. Can you tell me what to do, preferably with a code. If transferring large packets is terrible, then tell me how to do it differently, but do not suggest using third-party APIs for this (dropbox, etc.) P.S. I am passing bytes to a JSONObject, with the key file and encode the byte array to a string and then decrypt on the client.