Skip to Content
⚠ Under Construction
ReferenceC++ APIBroadcastMessageEvent

endstone::BroadcastMessageEvent

Event triggered for server broadcast messages such as from Server::broadcast .

Bases: endstone::Cancellable< ServerEvent >

Attributes:

NameDescription
NAME

Functions:

NAME

const std::string endstone::BroadcastMessageEvent::NAME;

BroadcastMessageEvent

BroadcastMessageEvent(bool async, Message message, std::unordered_set<const CommandSender *> recipients)

getEventName

std::string getEventName() override const

Gets a user-friendly identifier for this event.

Returns:

name of this event

getMessage

const Message &getMessage() const

Get the message to broadcast.

Returns:

Message to broadcast

getRecipients

const std::unordered_set<const CommandSender *> &getRecipients() const

Gets a set of recipients that this broadcast message will be displayed to.

Returns:

All CommandSenders who will see this broadcast message

setMessage

void setMessage(Message message)

Set the message to broadcast.

Parameters:

  • message New message to broadcast
Last updated on