Commit Graph

9 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
81d9cacff8 Set help index page to 1 for invalid numbers. Fixes BUKKIT-1569 2012-04-30 17:47:27 -05:00
Dinnerbone (Laptop)
d61f0dbe41 Updated version to 1.2.5-R0.1-SNAPSHOT, changed commands to match vanilla 2012-03-30 23:34:18 +02:00
rmichela
65bf74947f [Bleeding] Moved HelpTopicComparator to Bukkit.jar. Addresses BUKKIT-1193 2012-03-16 03:48:22 -04:00
rmichela
d47ad6cf57 Aesthetic changes to the /help command. 2012-03-16 02:44:30 -04:00
rmichela
c254d84b06 [Bleeding] Help command should properly wrap command text - at least for english. Fixes BUKKIT-939 2012-03-08 02:02:12 -05:00
rmichela
bba2e1cd2f [Bleeding] Added Help API. Addresses BUKKIT-863 2012-03-01 04:28:21 -05:00
EvilSeph
39c0d81832 Added GameMode command. 2011-09-14 17:43:11 -04:00
Dinnerbone
0914132467 Moved all vanilla commands into Bukkit 2011-09-03 15:56:35 +01:00