Interface SpongeAudiences

  • All Superinterfaces:
    net.kyori.adventure.platform.AudienceProvider, AutoCloseable

    public interface SpongeAudiences
    extends net.kyori.adventure.platform.AudienceProvider
    A provider for creating Audiences for Sponge.
    Since:
    4.0.0
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      static @NonNull SpongeAudiences.Builder builder​(@NonNull org.spongepowered.api.plugin.PluginContainer plugin, @NonNull org.spongepowered.api.Game game)
      Creates an audience provider builder for a plugin.
      static @NotNull SpongeAudiences create​(@NotNull org.spongepowered.api.plugin.PluginContainer plugin, @NotNull org.spongepowered.api.Game game)
      Creates an audience provider for a plugin.
      @NotNull net.kyori.adventure.audience.Audience filter​(@NotNull Predicate<org.spongepowered.api.text.channel.MessageReceiver> filter)
      Creates an audience based on a filter.
      @NotNull net.kyori.adventure.audience.Audience player​(@NotNull org.spongepowered.api.entity.living.player.Player player)
      Gets an audience for a player.
      @NotNull net.kyori.adventure.audience.Audience receiver​(@NotNull org.spongepowered.api.text.channel.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 org.spongepowered.api.plugin.PluginContainer plugin,
                                               @NotNull
                                               @NotNull org.spongepowered.api.Game game)
        Creates an audience provider for a plugin.

        There will only be one provider for each plugin.

        Parameters:
        plugin - a plugin container
        game - a game
        Returns:
        an audience provider
        Since:
        4.0.0
      • builder

        static @NonNull SpongeAudiences.Builder builder​(@NonNull org.spongepowered.api.plugin.PluginContainer plugin,
                                                        @NonNull org.spongepowered.api.Game game)
        Creates an audience provider builder for a plugin.

        There will only be one provider for each plugin.

        Parameters:
        plugin - a plugin container
        game - a game
        Returns:
        an audience provider
        Since:
        4.0.0
      • receiver

        @NotNull
        @NotNull net.kyori.adventure.audience.Audience receiver​(@NotNull
                                                                @NotNull org.spongepowered.api.text.channel.MessageReceiver receiver)
        Gets an audience for a message receiver.
        Parameters:
        receiver - a message receiver
        Returns:
        an audience
        Since:
        4.0.0
      • player

        @NotNull
        @NotNull net.kyori.adventure.audience.Audience player​(@NotNull
                                                              @NotNull org.spongepowered.api.entity.living.player.Player player)
        Gets an audience for a player.
        Parameters:
        player - a player
        Returns:
        an audience
        Since:
        4.0.0
      • filter

        @NotNull
        @NotNull net.kyori.adventure.audience.Audience filter​(@NotNull
                                                              @NotNull Predicate<org.spongepowered.api.text.channel.MessageReceiver> filter)
        Creates an audience based on a filter.
        Parameters:
        filter - a filter
        Returns:
        an audience
        Since:
        4.0.0