From 90fcfecb7ccd76a374b56e79416fcd967c898e41 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 1 Feb 2014 10:34:20 +1100 Subject: [PATCH] Use lombok for vhost --- .../net/md_5/bungee/connection/InitialHandler.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java index 71d97b73..1d87d2b0 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java @@ -84,7 +84,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection }; @Getter private boolean onlineMode = BungeeCord.getInstance().config.isOnlineMode(); - private InetSocketAddress vHost; + @Getter + private InetSocketAddress virtualHost; private byte version = -1; @Getter private String UUID; @@ -207,7 +208,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection handshake.setHost( handshake.getHost().substring( 0, handshake.getHost().length() - 1 ) ); } - this.vHost = new InetSocketAddress( handshake.getHost(), handshake.getPort() ); + this.virtualHost = new InetSocketAddress( handshake.getHost(), handshake.getPort() ); bungee.getLogger().log( Level.INFO, "{0} has connected", this ); bungee.getPluginManager().callEvent( new PlayerHandshakeEvent( InitialHandler.this, handshake ) ); @@ -410,7 +411,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection } @Override - public synchronized void disconnect(String reason) + public void disconnect(String reason) { if ( !ch.isClosed() ) { @@ -450,12 +451,6 @@ public class InitialHandler extends PacketHandler implements PendingConnection return ( handshake == null ) ? version : handshake.getProtocolVersion(); } - @Override - public InetSocketAddress getVirtualHost() - { - return vHost; - } - @Override public InetSocketAddress getAddress() {