Interface SpongeAudiences
- All Superinterfaces:
AudienceProvider
,AutoCloseable
A provider for creating
Audience
s for Sponge.- Since:
- 4.0.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull SpongeAudiences.Builder
builder
(@NonNull PluginContainer plugin, @NonNull Game game) Creates an audience provider builder for a plugin.static @NotNull SpongeAudiences
create
(@NotNull PluginContainer plugin, @NotNull Game game) Creates an audience provider for a plugin.@NotNull Audience
filter
(@NotNull Predicate<MessageReceiver> filter) Creates an audience based on a filter.@NotNull Audience
Gets an audience for a player.@NotNull Audience
receiver
(@NotNull MessageReceiver receiver) Gets an audience for a message receiver.Methods inherited from interface net.kyori.adventure.platform.AudienceProvider
all, close, console, flattener, permission, permission, player, players, server, world
-
Method Details
-
create
@NotNull static @NotNull SpongeAudiences create(@NotNull @NotNull PluginContainer plugin, @NotNull @NotNull Game game) Creates an audience provider for a plugin.There will only be one provider for each plugin.
- Parameters:
plugin
- a plugin containergame
- a game- Returns:
- an audience provider
- Since:
- 4.0.0
-
builder
static @NonNull SpongeAudiences.Builder builder(@NonNull PluginContainer plugin, @NonNull Game game) Creates an audience provider builder for a plugin.There will only be one provider for each plugin.
- Parameters:
plugin
- a plugin containergame
- a game- Returns:
- an audience provider
- Since:
- 4.0.0
-
receiver
Gets an audience for a message receiver.- Parameters:
receiver
- a message receiver- Returns:
- an audience
- Since:
- 4.0.0
-
player
Gets an audience for a player.- Parameters:
player
- a player- Returns:
- an audience
- Since:
- 4.0.0
-
filter
Creates an audience based on a filter.- Parameters:
filter
- a filter- Returns:
- an audience
- Since:
- 4.0.0
-