Class PlayerChannelUnregisterEvent
java.lang.Object
com.velocitypowered.api.event.player.PlayerChannelUnregisterEvent
This event is fired when a client (
Player) sends a plugin message through the
unregister channel. Velocity will not wait on this event to finish firing.-
Constructor Summary
ConstructorsConstructorDescriptionPlayerChannelUnregisterEvent(Player player, List<ChannelIdentifier> channels) Constructs a newPlayerChannelUnregisterEvent. -
Method Summary
Modifier and TypeMethodDescriptionGets the list ofChannelIdentifiers that the player has unregistered.Gets thePlayerwho sent the unregister message.toString()
-
Constructor Details
-
PlayerChannelUnregisterEvent
Constructs a newPlayerChannelUnregisterEvent.- Parameters:
player- the player that sent the unregister messagechannels- the list ofChannelIdentifiers being unregistered- Throws:
NullPointerException- ifplayerorchannelsisnull
-
-
Method Details
-
getPlayer
Gets thePlayerwho sent the unregister message.- Returns:
- the player involved in this event
-
getChannels
Gets the list ofChannelIdentifiers 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
-