Introduce ServerConnection interface
This will become very useful for plugin messaging support.
This commit is contained in:
@@ -29,7 +29,7 @@ public interface Player extends CommandSource, InboundConnection {
|
||||
* Returns the server that the player is currently connected to.
|
||||
* @return an {@link Optional} the server that the player is connected to, which may be empty
|
||||
*/
|
||||
Optional<ServerInfo> getCurrentServer();
|
||||
Optional<ServerConnection> getCurrentServer();
|
||||
|
||||
/**
|
||||
* Sends a chat message to the player's client.
|
||||
|
@@ -0,0 +1,12 @@
|
||||
package com.velocitypowered.api.proxy;
|
||||
|
||||
import com.velocitypowered.api.server.ServerInfo;
|
||||
|
||||
/**
|
||||
* Represents a connection to a backend server from the proxy for a client.
|
||||
*/
|
||||
public interface ServerConnection {
|
||||
ServerInfo getServerInfo();
|
||||
|
||||
Player getPlayer();
|
||||
}
|
Reference in New Issue
Block a user