Commit Graph

20 Commits

Author SHA1 Message Date
Wesley Wolfe
6d03f7a638 Pulling all pending Bukkit-JavaDoc changes 2013-09-10 21:02:53 -05:00
feildmaster
f3dfe8bd01 An executor set to null will now use the plugin. Fixes BUKKIT-3127 2012-12-09 00:31:25 -06:00
Wesley Wolfe
7adaf4bb6b Override toString() method in Command
Overriding the toString() method provides more human-readable feedback
when a problem occurs, including the version of the plugin if
applicable.
2012-10-19 15:46:28 -05:00
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
rmichela
cbc8d3589f [Bleeding] Added automatically generated plugin-level sub-indexes to the master help index. Addresses BUKKIT-1180 2012-03-16 02:47:14 -04:00
Erik Broes
dce83b6ce4 Generic cleanup of warnings, whitespace and style. 2011-12-25 16:02:30 +01:00
Dinnerbone
e6c273e8b0 Many javadoc fixes thanks to Celtic Minstrel 2011-09-25 02:56:40 +01:00
Dinnerbone
8831a00b4e Commands now have the ability to set a permission required before execution 2011-09-02 19:27:12 +01:00
Erik Broes
c4d444ce98 Whitespace + general cleanup 2011-05-15 14:06:02 +02:00
Erik Broes
6ec6d91c4c Compensate for sendMessage losing its 'unintended splitting on existing newlines'-feature 2011-03-12 17:01:56 +01:00
Dinnerbone
abd816dad6 Don't throw commands if the plugin is disabled 2011-03-07 16:41:50 +00:00
Erik Broes
010cfd1781 Java 1.5 compat. 2011-03-02 15:23:15 +01:00
Dinnerbone
82c1a41aa6 PluginCommand getExecutor + javadocs 2011-02-28 10:35:58 +00:00
Dinnerbone
e8519fc347 Added JavaPlugin.getCommand 2011-02-28 01:35:03 +00:00
Dinnerbone
4fa84d995c Tweaks to command system to allow setting executors via plugins (no more ambiguous onCommand in plugins) 2011-02-28 00:30:59 +00:00
EvilSeph
25271d9126 We need to set cmdSuccess accordingly. 2011-02-18 21:30:19 -05:00
Dinnerbone
efd55fbbe5 Exception handling in commands 2011-02-18 16:25:06 +00:00
stevenh
cc404ced12 Refactored event calling so its front loading avoiding the lookup for each event call.
This now uses an annoymous class implementing IExecutor that facilitates direct event method handler calling

Changed commands from being executed exclusively by a player to by a CommandSender to facilitate external command callers such as rcon

Fixed CustomEventListener

Merged in additional events

Added getFullName to PluginDescriptionFile which returns the combination of Name and Version

There's also a few bits of reformatting as it seems someones been editing with either tabs or dos eol :(
2011-01-29 16:23:56 +00:00
Dinnerbone
868aee0046 Fixed empty check in PluginCommand 2011-01-20 03:08:15 +00:00
VictorD
7a9ecbef53 Updated commands to have optional aliases, and to fallback to /pluginName:cmdName on name conflict. 2011-01-18 01:12:50 +01:00