Package studio.mevera.imperat.adventure
Interface AdventureProvider<S>
- Type Parameters:
S- the valueType of the source from which theAudiencecan be derived
- All Known Implementing Classes:
CastingAdventure,EmptyAdventure
public interface AdventureProvider<S>
The
AdventureProvider interface defines a mechanism for obtaining an
Audience based on a given source or context. It is designed to
facilitate communication or message broadcasting to a specific audience
within the application, typically in a context like a game server or
chat system where audiences are dynamically determined.-
Method Summary
Modifier and TypeMethodDescriptionnet.kyori.adventure.audience.AudienceObtains anAudiencefor the specified source.default net.kyori.adventure.audience.Audienceaudience(studio.mevera.imperat.context.Source source) Obtains anAudiencefor a givenSourceinstance.default voidclose()Performs any necessary cleanup or resource management.<SRC extends studio.mevera.imperat.context.Source>
AdventureHelpComponent<SRC>createHelpComponent(net.kyori.adventure.text.Component component) default voidSends a message to theAudiencederived from the specified source.default voidsend(studio.mevera.imperat.context.Source source, net.kyori.adventure.text.ComponentLike component) Sends a message to theAudiencederived from the specifiedSourceinstance.
-
Method Details
-
audience
Obtains anAudiencefor the specified source.- Parameters:
s- the source from which theAudienceis derived- Returns:
- the
Audiencecorresponding to the given source
-
audience
default net.kyori.adventure.audience.Audience audience(studio.mevera.imperat.context.Source source) Obtains anAudiencefor a givenSourceinstance. This method delegates toaudience(Object)by retrieving the origin from the providedSource.- Parameters:
source- theSourceinstance from which theAudienceis derived- Returns:
- the
Audiencecorresponding to the origin of the providedSource
-
send
Sends a message to theAudiencederived from the specified source.- Parameters:
sender- the source from which theAudienceis derivedcomponent- the message to be sent, represented by aComponentLikeinstance
-
send
default void send(studio.mevera.imperat.context.Source source, net.kyori.adventure.text.ComponentLike component) Sends a message to theAudiencederived from the specifiedSourceinstance. This method delegates tosend(Object, ComponentLike)by retrieving the origin from the providedSource.- Parameters:
source- theSourceinstance from which theAudienceis derivedcomponent- the message to be sent, represented by aComponentLikeinstance
-
close
default void close()Performs any necessary cleanup or resource management. By default, this method does nothing, but it can be overridden to provide specific close operations. -
createHelpComponent
<SRC extends studio.mevera.imperat.context.Source> AdventureHelpComponent<SRC> createHelpComponent(net.kyori.adventure.text.Component component)
-