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 const
Executes the command, returning its success
Parameters:
sender
Source of the commandargs
Arguments passed to the command
Returns:
true if the execution was successful, otherwise false
getExecutor
CommandExecutor &getExecutor() const
Gets the CommandExecutor associated with this command
Returns:
CommandExecutor object linked to this command
getPlugin
Plugin &getPlugin() const
Gets 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:
executor
New executor to run
Last updated on