Class AudienceRegistry
java.lang.Object
net.minestom.server.adventure.audience.AudienceRegistry
Holder of custom audiences.
-
Constructor Summary
ConstructorsConstructorDescriptionAudienceRegistry(Map<Key, Collection<Audience>> backingMap, Supplier<Collection<Audience>> backingCollection) Creates a new audience registrar with a given backing map. -
Method Summary
Modifier and TypeMethodDescriptionall()Gets every audience in the registry.booleanisEmpty()Checks if this registry is empty.Gets every audience member in the registry who matches a given predicate.Gets every audience in the registry under a specific key.Gets every audience in the registry under a specific key.voidregister(Keyed keyed, Collection<Audience> audiences) Adds some audiences to the registry.voidAdds some audiences to the registry.voidregister(Key key, Collection<Audience> audiences) Adds some audiences to the registry.voidAdds some audiences to the registry.
-
Constructor Details
-
AudienceRegistry
public AudienceRegistry(Map<Key, Collection<Audience>> backingMap, Supplier<Collection<Audience>> backingCollection) Creates a new audience registrar with a given backing map.- Parameters:
backingMap- the backing mapbackingCollection- a provider for the backing collection
-
-
Method Details
-
isEmpty
public boolean isEmpty()Checks if this registry is empty.- Returns:
trueif it is,falseotherwise
-
register
-
register
Adds some audiences to the registry.- Parameters:
keyed- the provider of the keyaudiences- the audiences
-
register
-
register
Adds some audiences to the registry.- Parameters:
key- the key to store the audiences underaudiences- the audiences
-
all
-
of
-
of
-
of
-