From febb661eb33e5b1b930f86362fa7a68a6271f65b Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 12 Jan 2013 12:36:41 +1100 Subject: [PATCH] Add more methods to sum up pending connection. --- .../api/connection/PendingConnection.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/api/src/main/java/net/md_5/bungee/api/connection/PendingConnection.java b/api/src/main/java/net/md_5/bungee/api/connection/PendingConnection.java index 54fc4e8e..4163239a 100644 --- a/api/src/main/java/net/md_5/bungee/api/connection/PendingConnection.java +++ b/api/src/main/java/net/md_5/bungee/api/connection/PendingConnection.java @@ -1,8 +1,31 @@ package net.md_5.bungee.api.connection; +import java.net.InetSocketAddress; + /** * Represents a user attempting to log into the proxy. */ public interface PendingConnection extends Connection { + + /** + * Get the requested username. + * + * @return the requested username, or null if not set + */ + public String getName(); + + /** + * Get the numerical client version of the player attempting to log in. + * + * @return the protocol version of the remote client + */ + public byte getVersion(); + + /** + * Get the requested virtual host that the client tried to connect to. + * + * @return request virtual host or null if invalid / not specified. + */ + public InetSocketAddress getVirtualHost(); }