java.lang.Object
net.minestom.server.adventure.audience.Audiences
Utility class to access Adventure audiences.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Audience
all()
Gets all audience members.static Audience
Gets all audience members that match the given predicate.static Audience
console()
Gets the console as an audience.static Audience
custom
(net.kyori.adventure.key.Key key) Gets all custom audience members stored using the given key.static Audience
custom
(net.kyori.adventure.key.Keyed keyed) Gets all custom audience members stored using the given keyed object.static Audience
Gets all custom audience members stored using the given keyed object that match the given predicate.static Audience
Gets all custom audience members stored using the given key that match the given predicate.static Audience
customs()
Gets all custom audience members.static Audience
Gets all custom audience members matching the given predicate.static AudienceProvider
<Iterable<? extends Audience>> iterable()
Gets theAudienceProvider
that provides iterables of audience members.static Audience
players()
Gets all audience members that are of typePlayer
.static Audience
Gets all audience members that are of typePlayer
and match the predicate.static AudienceRegistry
registry()
Gets the audience registry used to register custom audiences.static Audience
server()
static AudienceProvider
<Audience> single()
Gets theAudienceProvider
that provides forwarding audiences.
-
Constructor Details
-
Audiences
public Audiences()
-
-
Method Details
-
single
Gets theAudienceProvider
that provides forwarding audiences.- Returns:
- the instance
-
iterable
Gets theAudienceProvider
that provides iterables of audience members.- Returns:
- the instance
-
all
Gets all audience members. This returnsplayers()
combined withcustoms()
andconsole()
. This can be a costly operation, so it is often preferable to useserver()
instead.- Returns:
- all audience members
-
players
Gets all audience members that are of typePlayer
.- Returns:
- all players
-
players
Gets all audience members that are of typePlayer
and match the predicate.- Parameters:
filter
- the predicate- Returns:
- all players matching the predicate
-
console
Gets the console as an audience.- Returns:
- the console
-
server
- Returns:
- the audience of all players and the console
-
customs
Gets all custom audience members.- Returns:
- all custom audience members
-
custom
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
Gets all custom audience members stored using the given key.- Parameters:
key
- the key- Returns:
- all custom audience members stored using the key
-
custom
Gets all custom audience members stored using the given keyed object that match the given predicate.- Parameters:
keyed
- the keyed objectfilter
- the predicate- Returns:
- all custom audience members stored using the key
-
custom
Gets all custom audience members stored using the given key that match the given predicate.- Parameters:
key
- the keyfilter
- the predicate- Returns:
- all custom audience members stored using the key
-
customs
Gets all custom audience members matching the given predicate.- Parameters:
filter
- the predicate- Returns:
- all matching custom audience members
-
all
Gets all audience members that match the given predicate.- Parameters:
filter
- the predicate- Returns:
- all matching audience members
-
registry
Gets the audience registry used to register custom audiences.- Returns:
- the registry
-