removeConnection

open fun removeConnection(@NotNull connection: @NotNull UdpServerConnection): Boolean

Removes a connection from the connection map. This method calls UdpClientDisconnectedEvent after removing the connection from the map.

Return

true if the connection was successfully removed, false if the connection was not found.

Parameters

connection

The UDP server connection to remove.


abstract fun removeConnection(@NotNull connection: @NotNull UdpServerConnection, @NotNull reason: @NotNull UdpClientDisconnectedEvent.Reason): Boolean

Removes a connection from the connection map. This method calls UdpClientDisconnectedEvent after removing the connection from the map.

Return

true if the connection was successfully removed, false if the connection was not found.

Parameters

connection

The UDP server connection to remove.

reason

The reason of the removal.


open fun removeConnection(@NotNull player: @NotNull VoiceServerPlayer): Boolean

Removes a connection by player from the connection map. This method calls UdpClientDisconnectedEvent after removing the connection from the map.

Return

true if the connection was successfully removed, false if the connection was not found.

Parameters

player

The player associated with the connection to remove.


abstract fun removeConnection(@NotNull player: @NotNull VoiceServerPlayer, @NotNull reason: @NotNull UdpClientDisconnectedEvent.Reason): Boolean

Removes a connection by player from the connection map. This method calls UdpClientDisconnectedEvent after removing the connection from the map.

Return

true if the connection was successfully removed, false if the connection was not found.

Parameters

player

The player associated with the connection to remove.

reason

The reason of the removal.


open fun removeConnection(@NotNull secret: @NotNull UUID): Boolean
abstract fun removeConnection(@NotNull secret: @NotNull UUID, @NotNull reason: @NotNull UdpClientDisconnectedEvent.Reason): Boolean

Removes a connection by secret from the connection map. This method calls UdpClientDisconnectedEvent after removing the connection from the map.

Return

true if the connection was successfully removed, false if the connection was not found.

Parameters

secret

The secret associated with the connection to remove.