Interface IncomingMessageConsumer


@NonExtendable public interface IncomingMessageConsumer
Encapsulates the LuckPerms system which accepts incoming Messages from implementations of Messenger.
  • Method Details

    • consumeIncomingMessage

      boolean consumeIncomingMessage(@NonNull Message message)
      Consumes a message instance.

      The boolean returned from this method indicates whether or not the platform accepted the message. Some implementations which have multiple distribution channels may wish to use this result to dispatch the same message back to additional receivers.

      The implementation will usually return false if a message with the same ping id has already been processed.

      Parameters:
      message - the message
      Returns:
      true if the message was accepted by the plugin
    • consumeIncomingMessageAsString

      boolean consumeIncomingMessageAsString(@NonNull String encodedString)
      Consumes a message in an encoded string format.

      This method will decode strings obtained by calling OutgoingMessage.asEncodedString(). This means that basic implementations can successfully implement Messenger without providing their own serialisation.

      The boolean returned from this method indicates whether or not the platform accepted the message. Some implementations which have multiple distribution channels may wish to use this result to dispatch the same message back to additional receivers.

      The implementation will usually return false if a message with the same ping id has already been processed.

      Parameters:
      encodedString - the encoded string
      Returns:
      true if the message was accepted by the plugin