Client disconnect "Internal Exception: io.netty.handler.codec.EncoderException: String too big" when attempting to use books with run_command click events for long commands in dedicated servers
Attempting to use a book with a click-to-run-command text section with a command that is more than 256 characters long works perfectly in singleplayer. However, attempting to use the same CTR section, in the exact same book, in a dedicated server results in the client disconnecting with "Internal Exception: io.netty.handler.codec.EncoderException: String too big (was [command length] characters, max 256).
Repro command below, use a command block to run:
/give @p written_book{title:"Repro",author:"emr",generation:3,pages:['{"text":"Click me!","color":"#0066CC","underlined":true,"clickEvent":{"action":"run_command","value":"/give @s written_book{display:{Name:\'{\\"text\\":\\"Navy Seal Copypasta\\"}\',Lore:[\'{\\"text\\":\\"From the deep depths of /k/\\"}\']},title:\\"Navy Seal Copypasta\\",author:\\"4chan\\",generation:2,pages:[\'{\\"text\\":\\"What the **** did you just ******* say about me, you little *****? I\\\\\'ll have you know I graduated top of my class in the Navy Seals, and I\\\\\'ve been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained\\"}\',\'{\\"text\\":\\"in gorilla warfare and I\\\\\'m the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the **** out with precision the likes of which has never been seen before on this Earth, mark my ******* words. You\\"}\',\'{\\"text\\":\\"think you can get away with saying that **** to me over the Internet? Think again, ******. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm\\"}\',\'{\\"text\\":\\"that wipes out the pathetic little thing you call your life. You\\\\\'re ******* dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that\\\\\'s just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the\\"}\',\'{\\"text\\":\\"entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable *** off the face of the continent, you little ****. If only you could have known what unholy retribution your little \\\\\\\\\\"clever\\\\\\\\\\" comment was about to bring down\\"}\',\'{\\"text\\":\\"upon you, maybe you would have held your ******* tongue. But you couldn\\\\\'t, you didn\\\\\'t, and now you\\\\\'re paying the price, you goddamn idiot. I will **** fury all over you and you will drown in it. You\\\\\'re ******* dead, kiddo.\\\\\\\\n\\"}\']} 1"}}']} 1
Notice how in singleplayer, it gives the player the correct result of the book being given. However, if you run it in a dedicated server, it causes the client to disconnect with the error mentioned above.