Class endstone::UnknownCommandEvent¶
ClassList > endstone > UnknownCommandEvent
Called when a command sender executes a command that is not defined.
#include <endstone/event/command/unknown_command_event.h>
Inherits the following classes: endstone::Event
Public Functions¶
| Type | Name |
|---|---|
| ENDSTONE_EVENT (UnknownCommandEvent) |
|
| UnknownCommandEvent (const NotNull< CommandSender > & sender, std::string command_line, std::optional< Message > message) |
|
| std::string | getCommandLine () const Gets the command that was sent. |
| std::optional< Message > | getMessage () const Gets the message that will be returned. |
| const NotNull< CommandSender > & | getSender () const Gets the command sender. |
| void | setMessage (std::optional< Message > message) Sets the message that will be returned. |
Public Functions inherited from endstone::Event¶
See endstone::Event
| Type | Name |
|---|---|
| Event (bool async=false) |
|
| Event (const Event &) = delete |
|
| Event (Event &&) = default |
|
| virtual std::string | getEventName () const = 0 Gets a user-friendly identifier for this event. |
| bool | isAsynchronous () const Any custom event that should not by synchronized with other events must use the specific constructor. |
| Event & | operator= (const Event &) = delete |
| Event & | operator= (Event &&) = default |
| virtual | ~Event () = default |
Public Functions Documentation¶
function ENDSTONE_EVENT¶
function UnknownCommandEvent¶
inline endstone::UnknownCommandEvent::UnknownCommandEvent (
const NotNull < CommandSender > & sender,
std::string command_line,
std::optional< Message > message
)
function getCommandLine¶
Gets the command that was sent.
Returns:
command sent
function getMessage¶
Gets the message that will be returned.
Returns:
unknown command message, or no value if no message will be sent
function getSender¶
Gets the command sender.
Returns:
sender of the command
function setMessage¶
Sets the message that will be returned.
Parameters:
messagethe message to be returned, or no value to avoid sending a message
The documentation for this class was generated from the following file include/endstone/event/command/unknown_command_event.h