// Proxies modify the hostname in the HandshakeMessage to contain
// the client's UUID and (optionally) properties
if (session.getServer().getProxySupport()) {
try {
session.setProxyData(new ProxyData(session, message.getAddress()));
} catch (IllegalArgumentException ex) {
session.disconnect("Invalid proxy data provided.");
// protocol is still set here and below to prevent errors
// trying to decode packets after this one under the wrong
// protocol, even though client is kicked