Cancellable
public class BroadcastMessageEvent extends ServerEvent implements Cancellable
Server.broadcast(String, String)
.Event.Result
Constructor | Description |
---|---|
BroadcastMessageEvent(java.lang.String message,
java.util.Set<CommandSender> recipients) |
Modifier and Type | Method | Description |
---|---|---|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
java.lang.String |
getMessage() |
Get the message to broadcast.
|
java.util.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.
|
void |
setCancelled(boolean cancelled) |
Sets the cancellation state of this event.
|
void |
setMessage(java.lang.String message) |
Set the message to broadcast.
|
getEventName, isAsynchronous
public BroadcastMessageEvent(java.lang.String message, java.util.Set<CommandSender> recipients)
public java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
- New message to broadcastpublic java.util.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()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancelled)
Cancellable
setCancelled
in interface Cancellable
cancelled
- true if you wish to cancel this eventpublic HandlerList getHandlers()
getHandlers
in class Event
public static HandlerList getHandlerList()
Copyright © 2018. All rights reserved.