Interface PluginMessageRecipient

All Known Subinterfaces:
Player, Server, World

public interface PluginMessageRecipient
Represents a possible recipient for a Plugin Message.
  • Method Details

    • sendPluginMessage

      void sendPluginMessage(@NotNull @NotNull Plugin source, @NotNull @NotNull String channel, byte @NotNull [] message)
      Sends this recipient a Plugin Message on the specified outgoing channel.

      The message may not be larger than Messenger.MAX_MESSAGE_SIZE bytes, and the plugin must be registered to send messages on the specified channel.

      Parameters:
      source - The plugin that sent this message.
      channel - The channel to send this message on.
      message - The raw message to send.
      Throws:
      IllegalArgumentException - Thrown if the source plugin is disabled.
      IllegalArgumentException - Thrown if source, channel or message is null.
      MessageTooLargeException - Thrown if the message is too big.
      ChannelNotRegisteredException - Thrown if the channel is not registered for this plugin.
    • getListeningPluginChannels

      @NotNull @NotNull Set<String> getListeningPluginChannels()
      Gets a set containing all the Plugin Channels that this client is listening on. Does not contain the BungeeCord channel due to its special status.
      Returns:
      Set containing all the channels that this client may accept.
    • sendCustomPayload

      void sendCustomPayload(@NotNull NamespacedKey channel, byte @NotNull [] value)
      이 대상에게 커스텀 페이로드를 채널 등록 없이 전송합니다.
      Parameters:
      channel - 채널 이름
      value - 데이터
    • sendCustomPayload

      void sendCustomPayload(@NotNull NamespacedKey channel, @NotNull io.netty.buffer.ByteBuf buf)
      이 대상에게 커스텀 페이로드를 채널 등록 없이 전송합니다.
      Parameters:
      channel - 채널 이름
      buf - netty bytebuf 오브젝트