Interface SpongeAudiences

    • 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 container
        game - 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 container
        game - 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