Commit Graph

7 Commits

Author SHA1 Message Date
Score_Under
ede3fd278d Add tab-completion API. Fixes BUKKIT-2181. Adds BUKKIT-2602
CommandMap contains a method that will auto-complete commands
appropriately. Before the first space, it searches for commands of which
the sender has permission. After the first space, it delegates to the
individual command.

Vanilla commands contain implementations to mimic vanilla
implementation. Exception would be give, that allows for name matching;
a feature we already allowed as part of the command is now supported for
auto-complete as well.

Plugin commands can get a tab completer set to delegate the completion
for. If no tab completer is set, it can check the executor to see if it
implements the tab completion interface. It will also attempt to chain
calls if null gets returned from these interfaces. Plugins also
implement the new TabCompleter interface, to add ease-of-use for plugin
developers, similar to the onCommand() method.

The default command implementation simply searches for player names.

To help facilitate command completion, a utility class was added with
two functions. One checks two strings, to see if the specified string
starts with (ignoring case) the second. The other method uses the first
to selectively copy elements from one collection to another.
2012-10-16 00:05:40 -05:00
feildmaster
09ef15e950 Update commands to match 1.3 vanilla commands 2012-08-06 06:59:46 -05:00
EvilSeph
e5ef8c2b40 Removed pointless counter and use .length in PluginsCommand. Thanks nallar! 2012-04-02 16:28:58 -04:00
EvilSeph
cec8ceab3c Added plugin count to the PluginsCommand. 2012-03-22 21:40:31 -04:00
rmichela
7ea7959e69 [Bleeding] Added option to remove entire plugins from the help index using the help.yml file. Addresses BUKKIT-1178 2012-03-16 02:42:12 -04:00
Erik Broes
dce83b6ce4 Generic cleanup of warnings, whitespace and style. 2011-12-25 16:02:30 +01:00
Dinnerbone
8831a00b4e Commands now have the ability to set a permission required before execution 2011-09-02 19:27:12 +01:00