Interface AudienceProvider<A>

Type Parameters:
A - the type that is provided

public interface AudienceProvider<A>
A generic provider of audiences or some subtype.
  • Method Summary

    Modifier and Type
    Method
    Description
    all()
    Gets all audience members.
    Gets all audience members that match the given predicate.
    Gets the console as an audience.
    custom(net.kyori.adventure.key.Key key)
    Gets all custom audience members stored using the given key.
    default A
    custom(net.kyori.adventure.key.Keyed keyed)
    Gets all custom audience members stored using the given keyed object.
    default A
    custom(net.kyori.adventure.key.Keyed keyed, Predicate<Audience> filter)
    Gets all custom audience members stored using the given keyed object that match the given predicate.
    custom(net.kyori.adventure.key.Key key, Predicate<Audience> filter)
    Gets all custom audience members stored using the given key that match the given predicate.
    Gets all custom audience members.
    Gets all custom audience members matching the given predicate.
    Gets all audience members that are of type Player.
    Gets all audience members that are of type Player and match the predicate.
    Gets the audience registry used to register custom audiences.
    Gets the combination of players() and console().
  • Method Details

    • all

      A all()
      Gets all audience members. This returns players() combined with customs() and console(). This can be a costly operation, so it is often preferable to use server() instead.
      Returns:
      all audience members
    • players

      A players()
      Gets all audience members that are of type Player.
      Returns:
      all players
    • players

      A players(Predicate<Player> filter)
      Gets all audience members that are of type Player and match the predicate.
      Parameters:
      filter - the predicate
      Returns:
      all players matching the predicate
    • console

      A console()
      Gets the console as an audience.
      Returns:
      the console
    • server

      A server()
      Gets the combination of players() and console().
      Returns:
      the audience of all players and the console
    • custom

      default A custom(net.kyori.adventure.key.Keyed keyed)
      Gets all custom audience members stored using the given keyed object.
      Parameters:
      keyed - the keyed object
      Returns:
      all custom audience members stored using the key of the object
    • custom

      A custom(net.kyori.adventure.key.Key key)
      Gets all custom audience members stored using the given key.
      Parameters:
      key - the key
      Returns:
      all custom audience members stored using the key
    • custom

      default A custom(net.kyori.adventure.key.Keyed keyed, Predicate<Audience> filter)
      Gets all custom audience members stored using the given keyed object that match the given predicate.
      Parameters:
      keyed - the keyed object
      filter - the predicate
      Returns:
      all custom audience members stored using the key
    • custom

      A custom(net.kyori.adventure.key.Key key, Predicate<Audience> filter)
      Gets all custom audience members stored using the given key that match the given predicate.
      Parameters:
      key - the key
      filter - the predicate
      Returns:
      all custom audience members stored using the key
    • customs

      A customs()
      Gets all custom audience members.
      Returns:
      all custom audience members
    • customs

      A customs(Predicate<Audience> filter)
      Gets all custom audience members matching the given predicate.
      Parameters:
      filter - the predicate
      Returns:
      all matching custom audience members
    • all

      A all(Predicate<Audience> filter)
      Gets all audience members that match the given predicate.
      Parameters:
      filter - the predicate
      Returns:
      all matching audience members
    • registry

      AudienceRegistry registry()
      Gets the audience registry used to register custom audiences.
      Returns:
      the registry