Class Audiences

java.lang.Object
org.spongepowered.api.adventure.Audiences

public final class Audiences extends Object
  • Constructor Details

    • Audiences

      public Audiences()
  • Method Details

    • server

      public static Audience server()
      Gets an Audience that targets the entire server, including players and system, when available.
      Returns:
      An audience
    • onlinePlayers

      public static Audience onlinePlayers()
      Gets an Audience that targets all online players.
      Returns:
      An audience
    • withPermission

      public static Audience withPermission(String permission)
      Gets an Audience that targets all online players with the specified permission.
      Parameters:
      permission - The permission
      Returns:
      An audience
    • filtered

      public static Optional<Audience> filtered(Audience audience, Predicate<Audience> predicate)
      Filters an audience with given predicate.

      For ForwardingAudiences the predicate is tested on each ForwardingAudience.audiences()

      Parameters:
      predicate - The predicate
      Returns:
      The filtered audience.
    • system

      public static Audience system()
      Gets an Audience that targets the system, such as a server console.
      Returns:
      An audience