Package net.luckperms.api.messenger
Interface MessengerProvider
Represents a provider for
Messenger instances.
Users wishing to provide their own implementation for the plugins "Messaging Service" should implement and register this interface.
-
Method Summary
Modifier and TypeMethodDescriptiongetName()Gets the name of this provider.obtain(@NonNull IncomingMessageConsumer incomingMessageConsumer) Creates and returns a newMessengerinstance, which passes incoming messages to the providedIncomingMessageConsumer.
-
Method Details
-
getName
Gets the name of this provider.- Returns:
- the provider name
-
obtain
Creates and returns a newMessengerinstance, which passes incoming messages to the providedIncomingMessageConsumer.As the agent should pass incoming messages to the given consumer, this method should always return a new object.
- Parameters:
incomingMessageConsumer- the consumer the new instance should pass incoming messages to- Returns:
- a new messenger agent instance
-