Class PlayerChannelUnregisterEvent

java.lang.Object
com.velocitypowered.api.event.player.PlayerChannelUnregisterEvent

public final class PlayerChannelUnregisterEvent extends Object
Fired when a Player unregisters one or more plugin channels from the proxy.

This event is triggered when the client sends a plugin message through the special "unregister" channel, indicating that it will no longer communicate over the specified plugin message channels.

Velocity dispatches this event asynchronously and will not wait for event listeners to complete before continuing with normal processing.

Note that plugin message registration and unregistration are part of the Minecraft plugin messaging protocol used to coordinate communication between the client, proxy, and backend servers.

Since:
3.4.0
  • Constructor Details

  • Method Details

    • getPlayer

      public Player getPlayer()
      Gets the Player who sent the unregister message.
      Returns:
      the player involved in this event
    • getChannels

      public List<ChannelIdentifier> getChannels()
      Gets the list of ChannelIdentifiers that the player has unregistered.

      These identifiers correspond to the plugin message channels that the client has indicated it will no longer use.

      Returns:
      the list of unregistered channels
    • toString

      public String toString()
      Returns a string representation of this event, useful for debugging.
      Overrides:
      toString in class Object
      Returns:
      a string describing the player and unregistered channels