Skip to Content
⚠ Under Construction
ReferenceC++ APIServerCommandEvent

endstone::ServerCommandEvent

Called when the console runs a command, early in the process.

Bases: endstone::Cancellable< ServerEvent >

Attributes:

NameDescription
NAME

Functions:

NAME

const std::string endstone::ServerCommandEvent::NAME;

ServerCommandEvent

ServerCommandEvent(CommandSender &sender, std::string command)

getCommand

std::string getCommand() const

Gets the command that the server is attempting to execute from the console

Returns:

Command the server is attempting to execute

getEventName

std::string getEventName() override const

Gets a user-friendly identifier for this event.

Returns:

name of this event

getSender

CommandSender &getSender() const

Get the command sender.

Returns:

The sender

setCommand

void setCommand(std::string message)

Sets the command that the server will execute

Parameters:

  • message New message that the server will execute
Last updated on