public class BroadcastMessageEvent extends ServerEvent implements Cancellable
Server.broadcast(String, String).
 This event behaves similarly to AsyncPlayerChatEvent in that it
 should be async if fired from an async thread. Please see that event for
 further information.Event.Result| Constructor and Description | 
|---|
BroadcastMessageEvent(boolean isAsync,
                     net.kyori.adventure.text.Component message,
                     @NotNull Set<CommandSender> recipients)  | 
BroadcastMessageEvent(boolean isAsync,
                     @NotNull String message,
                     @NotNull Set<CommandSender> recipients)
Deprecated.  
 | 
BroadcastMessageEvent(net.kyori.adventure.text.Component message,
                     @NotNull Set<CommandSender> recipients)
Deprecated.  
 | 
BroadcastMessageEvent(@NotNull String message,
                     @NotNull Set<CommandSender> recipients)
Deprecated.  
 | 
| Modifier and Type | Method and Description | 
|---|---|
static @NotNull HandlerList | 
getHandlerList()  | 
@NotNull HandlerList | 
getHandlers()  | 
@NotNull String | 
getMessage()
Deprecated. 
 
in favour of  
message() | 
@NotNull Set<CommandSender> | 
getRecipients()
Gets a set of recipients that this chat message will be displayed to. 
 | 
boolean | 
isCancelled()
Gets the cancellation state of this event. 
 | 
net.kyori.adventure.text.Component | 
message()
Get the broadcast message. 
 | 
void | 
message(net.kyori.adventure.text.Component message)
Set the broadcast message. 
 | 
void | 
setCancelled(boolean cancelled)
Sets the cancellation state of this event. 
 | 
void | 
setMessage(@NotNull String message)
Deprecated. 
 
in favour of  
message(net.kyori.adventure.text.Component) | 
callEvent, getEventName, isAsynchronous@Deprecated public BroadcastMessageEvent(@NotNull @NotNull String message, @NotNull @NotNull Set<CommandSender> recipients)
@Deprecated public BroadcastMessageEvent(boolean isAsync, @NotNull @NotNull String message, @NotNull @NotNull Set<CommandSender> recipients)
@Deprecated public BroadcastMessageEvent(@NotNull net.kyori.adventure.text.Component message, @NotNull @NotNull Set<CommandSender> recipients)
public BroadcastMessageEvent(boolean isAsync,
                             @NotNull
                             net.kyori.adventure.text.Component message,
                             @NotNull
                             @NotNull Set<CommandSender> recipients)
@NotNull public net.kyori.adventure.text.Component message()
public void message(@NotNull net.kyori.adventure.text.Component message)
message - New message to broadcast@NotNull @Deprecated public @NotNull String getMessage()
message()@Deprecated public void setMessage(@NotNull @NotNull String message)
message(net.kyori.adventure.text.Component)message - New message to broadcast@NotNull public @NotNull Set<CommandSender> getRecipients()
The set returned is not guaranteed to be mutable and may auto-populate on access. Any listener accessing the returned set should be aware that it may reduce performance for a lazy set implementation.
 Listeners should be aware that modifying the list may throw UnsupportedOperationException if the event caller provides an
 unmodifiable set.
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancelled)
CancellablesetCancelled in interface Cancellablecancelled - true if you wish to cancel this event@NotNull public @NotNull HandlerList getHandlers()
getHandlers in class Event@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2022. All rights reserved.