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 create​(@NonNull org.spongepowered.api.plugin.PluginContainer plugin, @NonNull org.spongepowered.api.Game game)
      Creates an audience provider for a plugin.
      @NonNull net.kyori.adventure.audience.Audience filter​(@NonNull Predicate<org.spongepowered.api.text.channel.MessageReceiver> filter)
      Creates an audience based on a filter.
      @NonNull net.kyori.adventure.audience.Audience player​(@NonNull org.spongepowered.api.entity.living.player.Player player)
      Gets an audience for a player.
      @NonNull net.kyori.adventure.audience.Audience receiver​(@NonNull 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, permission, permission, player, players, server, world
    • Method Detail

      • create

        static @NonNull SpongeAudiences create​(@NonNull org.spongepowered.api.plugin.PluginContainer plugin,
                                               @NonNull 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
      • receiver

        @NonNull net.kyori.adventure.audience.Audience receiver​(@NonNull 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

        @NonNull net.kyori.adventure.audience.Audience player​(@NonNull 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

        @NonNull net.kyori.adventure.audience.Audience filter​(@NonNull 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