diff --git a/src/main/java/org/spongepowered/api/network/ClientConnectionState.java b/src/main/java/org/spongepowered/api/network/ClientConnectionState.java index bb533b06a9..487ffbab83 100644 --- a/src/main/java/org/spongepowered/api/network/ClientConnectionState.java +++ b/src/main/java/org/spongepowered/api/network/ClientConnectionState.java @@ -32,6 +32,15 @@ */ public interface ClientConnectionState extends EngineConnectionState { + /** + * Gets the associated {@link ClientSideConnection connection} for + * this connection state. + * + * @return The connection + */ + @Override + ClientSideConnection connection(); + /** * Represents the intent state of the connection * from the client to the server on the client side. diff --git a/src/main/java/org/spongepowered/api/network/EngineConnectionState.java b/src/main/java/org/spongepowered/api/network/EngineConnectionState.java index d8453fcce4..060b36cf69 100644 --- a/src/main/java/org/spongepowered/api/network/EngineConnectionState.java +++ b/src/main/java/org/spongepowered/api/network/EngineConnectionState.java @@ -33,6 +33,14 @@ */ public interface EngineConnectionState { + /** + * Gets the associated {@link EngineConnection connection} for + * this connection state. + * + * @return The connection + */ + EngineConnection connection(); + /** * Gets whatever the connection was established because * the client was transferred. diff --git a/src/main/java/org/spongepowered/api/network/ServerConnectionState.java b/src/main/java/org/spongepowered/api/network/ServerConnectionState.java index 499c023cde..8461e91469 100644 --- a/src/main/java/org/spongepowered/api/network/ServerConnectionState.java +++ b/src/main/java/org/spongepowered/api/network/ServerConnectionState.java @@ -31,6 +31,15 @@ */ public interface ServerConnectionState extends EngineConnectionState { + /** + * Gets the associated {@link ServerSideConnection connection} for + * this connection state. + * + * @return The connection + */ + @Override + ServerSideConnection connection(); + /** * Represents a intent state between a minecraft client and server. */