Package org.bukkit.plugin.messaging
Interface PluginMessageListener
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A listener for a specific Plugin Channel, which will receive notifications
of messages sent from a client.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
onPluginMessageReceived
(@NotNull String channel, @NotNull PlayerConnection connection, byte @NotNull [] message) A method that will be invoked when a PluginMessageSource sends a plugin message on a registered channel.void
A method that will be thrown when a PluginMessageSource sends a plugin message on a registered channel.
-
Method Details
-
onPluginMessageReceived
void onPluginMessageReceived(@NotNull @NotNull String channel, @NotNull @NotNull Player player, byte @NotNull [] message) A method that will be thrown when a PluginMessageSource sends a plugin message on a registered channel.Only called for joined players.
- Parameters:
channel
- Channel that the message was sent through.player
- Source of the message.message
- The raw message that was sent.- See Also:
-
onPluginMessageReceived
@Experimental default void onPluginMessageReceived(@NotNull @NotNull String channel, @NotNull @NotNull PlayerConnection connection, byte @NotNull [] message) A method that will be invoked when a PluginMessageSource sends a plugin message on a registered channel.Called for both joined players and players in the configuration stage.
- Parameters:
channel
- Channel that the message was sent through.connection
- Source of the message.message
- The raw message that was sent.
-