endstone::PluginCommand
Represents a Command belonging to a Plugin .
Bases: endstone::Command
Functions:
PluginCommand
PluginCommand(const Command &command, Plugin &owner) asPluginCommand
PluginCommand *asPluginCommand() override const execute
bool execute(CommandSender &sender,
const std::vector<std::string> &args) override constExecutes the command, returning its success
Parameters:
senderSource of the commandargsArguments passed to the command
Returns:
true if the execution was successful, otherwise false
getExecutor
CommandExecutor &getExecutor() constGets the CommandExecutor associated with this command
Returns:
CommandExecutor object linked to this command
getPlugin
Plugin &getPlugin() constGets the owner of this PluginCommand
Returns:
Plugin that owns this command
setExecutor
void setExecutor(std::shared_ptr<CommandExecutor> executor)Sets the CommandExecutor to run when parsing this command
Parameters:
executorNew executor to run
Last updated on