Package org.spongepowered.api.network
Interface EngineConnection
-
- All Superinterfaces:
RemoteConnection
- All Known Subinterfaces:
ClientSideConnection,LocalPlayerConnection,PlayerConnection,ServerPlayerConnection,ServerSideConnection
public interface EngineConnection extends RemoteConnection
Represents a connection on the server or client engine.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the connection, showing the default disconnect reason.voidclose(Component reason)Closes the connection with the given reason.EngineConnectionSide<? extends EngineConnection>side()Gets the side this connection is on.-
Methods inherited from interface org.spongepowered.api.network.RemoteConnection
address, virtualHost
-
-
-
-
Method Detail
-
side
EngineConnectionSide<? extends EngineConnection> side()
Gets the side this connection is on.- Returns:
- The side
-
close
void close()
Closes the connection, showing the default disconnect reason. (the translation keydisconnect.disconnected)- Specified by:
closein interfaceRemoteConnection
-
close
void close(Component reason)
Closes the connection with the given reason.- Parameters:
reason- The reason for the disconnection
-
-