Tweaks to command system to allow setting executors via plugins (no more ambiguous onCommand in plugins)

This commit is contained in:
Dinnerbone
2011-02-28 00:30:59 +00:00
parent caa5cc9325
commit 4fa84d995c
7 changed files with 48 additions and 39 deletions

View File

@@ -0,0 +1,18 @@
package org.bukkit.command;
/**
* Represents a class which contains a single method for executing commands
*/
public interface CommandExecutor {
/**
* Executes the given command, returning its success
*
* @param sender Source of the command
* @param command Command which was executed
* @param label Alias of the command which was used
* @param args Passed command arguments
* @return true if a valid command, otherwise false
*/
public boolean onCommand(CommandSender sender, Command command, String label, String[] args);
}