Interface AudienceMessageEvent
-
- All Superinterfaces:
Event
,MessageEvent
- All Known Subinterfaces:
AdvancementEvent.Grant
,DestructEntityEvent
,DestructEntityEvent.Death
,PlayerChatEvent
,ServerSideConnectionEvent.Disconnect
,ServerSideConnectionEvent.Join
public interface AudienceMessageEvent extends MessageEvent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.Optional<Audience>
audience()
Gets the current audience that this message will be sent to.default void
filterAudience(java.util.function.Predicate<Audience> predicate)
Filters the current audience with given predicate.Audience
originalAudience()
Gets the original audience that this message will be sent to.void
setAudience(@Nullable Audience audience)
Sets the audience for this message to go to.-
Methods inherited from interface org.spongepowered.api.event.message.MessageEvent
message, originalMessage, setMessage
-
-
-
-
Method Detail
-
originalAudience
Audience originalAudience()
Gets the original audience that this message will be sent to.- Returns:
- The original audience to send to
-
audience
java.util.Optional<Audience> audience()
Gets the current audience that this message will be sent to.- Returns:
- The message channel the message in this event will be sent to
-
setAudience
void setAudience(@Nullable Audience audience)
Sets the audience for this message to go to.- Parameters:
audience
- The audience to set
-
filterAudience
default void filterAudience(java.util.function.Predicate<Audience> predicate)
Filters the current audience with given predicate.- Parameters:
predicate
- the predicate
-
-