Interface SpongeAudiences
-
- All Superinterfaces:
AudienceProvider
,java.lang.AutoCloseable
public interface SpongeAudiences extends AudienceProvider
A provider for creatingAudience
s for Sponge.- Since:
- 4.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SpongeAudiences.Builder
A builder forSpongeAudiences
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static @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 java.util.function.Predicate<MessageReceiver> filter)
Creates an audience based on a filter.@NotNull Audience
player(@NotNull Player player)
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 Detail
-
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
@NotNull @NotNull Audience receiver(@NotNull @NotNull MessageReceiver receiver)
Gets an audience for a message receiver.- Parameters:
receiver
- a message receiver- Returns:
- an audience
- Since:
- 4.0.0
-
player
@NotNull @NotNull Audience player(@NotNull @NotNull Player player)
Gets an audience for a player.- Parameters:
player
- a player- Returns:
- an audience
- Since:
- 4.0.0
-
filter
@NotNull @NotNull Audience filter(@NotNull @NotNull java.util.function.Predicate<MessageReceiver> filter)
Creates an audience based on a filter.- Parameters:
filter
- a filter- Returns:
- an audience
- Since:
- 4.0.0
-
-