geforkt von Mirrors/Velocity
Add disconnect API call
Dieser Commit ist enthalten in:
Ursprung
db9f668290
Commit
8352f7fa70
@ -53,4 +53,6 @@ public interface Player extends CommandSource, InboundConnection, ChannelMessage
|
|||||||
* @return a new connection request
|
* @return a new connection request
|
||||||
*/
|
*/
|
||||||
ConnectionRequestBuilder createConnectionRequest(@NonNull ServerInfo info);
|
ConnectionRequestBuilder createConnectionRequest(@NonNull ServerInfo info);
|
||||||
|
|
||||||
|
void disconnect(Component reason);
|
||||||
}
|
}
|
||||||
|
@ -134,6 +134,11 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
|||||||
return new ConnectionRequestBuilderImpl(info);
|
return new ConnectionRequestBuilderImpl(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void disconnect(Component reason) {
|
||||||
|
connection.closeWith(Disconnect.create(reason));
|
||||||
|
}
|
||||||
|
|
||||||
public VelocityServerConnection getConnectedServer() {
|
public VelocityServerConnection getConnectedServer() {
|
||||||
return connectedServer;
|
return connectedServer;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren