Interface CommandExecutor
- All Known Subinterfaces:
Plugin, TabExecutor
- All Known Implementing Classes:
JavaPlugin, PluginBase
Represents a class which contains a single method for executing commands
- API Note:
- plugin developers should prefer to use the Brigadier command API. For a direct alternative to Bukkit commands, Basic commands are recommended
-
Method Summary
-
Method Details
-
onCommand
@Obsolete(since="26.3") boolean onCommand(@NotNull @NotNull CommandSender sender, @NotNull @NotNull Command command, @NotNull @NotNull String label, @NotNull @NotNull String @NotNull [] args) Executes the given command, returning its success.
If false is returned, then the "usage" plugin.yml entry for this command (if defined) will be sent to the player.- Parameters:
sender- Source of the commandcommand- Command which was executedlabel- Alias of the command which was usedargs- Passed command arguments- Returns:
- true if a valid command, otherwise false
- API Note:
- plugin developers should prefer to use the Brigadier command API. For a direct alternative to Bukkit commands, Basic commands are recommended
-