--- a/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java
+++ b/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java
@@ -20,7 +_,7 @@
     }
 
     private ClientIntentionPacket(FriendlyByteBuf buffer) {
-        this(buffer.readVarInt(), buffer.readUtf(255), buffer.readUnsignedShort(), ClientIntent.byId(buffer.readVarInt()));
+        this(buffer.readVarInt(), buffer.readUtf(Short.MAX_VALUE), buffer.readUnsignedShort(), ClientIntent.byId(buffer.readVarInt())); // Spigot - increase max hostName length
     }
 
     private void write(FriendlyByteBuf buffer) {
