23 Commits

Author SHA1 Message Date
feildmaster
23854afbfe Apply commandBlockOutput to broadcastMessage. Addresses BUKKIT-3117 2012-12-18 04:47:56 -06:00
Wesley Wolfe
ffbdc37ff9 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
9fd9767a4a 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
61d302c232 Update commands to match 1.3 vanilla commands 2012-08-06 06:59:46 -05:00
feildmaster
0b304a288e Update Bukkit for 1.3.1 changes 2012-08-02 04:54:21 -05:00
rmichela
b8444288a9 [Bleeding] Added Help API. Addresses BUKKIT-863 2012-03-01 04:28:21 -05:00
Wesley Wolfe
465818ef42 [Bleeding] Implemented customizable permission messages. 2012-02-09 04:02:11 -05:00
Erik Broes
88c17a7f86 Generic cleaning 2012-01-15 14:37:43 +01:00
Erik Broes
b9fca3c04d Generic cleanup of warnings, whitespace and style. 2011-12-25 16:02:30 +01:00
Nathan Adams
8d55e127bc I do believe that I made a typo 2011-12-04 11:08:40 +00:00
Nathan Adams
2406704752 Bukkit will no longer leak tears. He has been cheered up. 2011-12-04 10:41:46 +00:00
Dinnerbone
fe4f4c5f58 Many javadoc fixes thanks to Celtic Minstrel 2011-09-25 02:56:40 +01:00
Dinnerbone
37c79edb3e Now with 60% less Dave errors! 2011-09-16 21:18:53 +01:00
Dinnerbone
1fd394bc7c Moved all vanilla commands into Bukkit 2011-09-03 15:56:35 +01:00
Dinnerbone
c1f858534b Fixed java ver method 2011-09-02 19:35:58 +01:00
Dinnerbone
0d11aa7cca Commands now have the ability to set a permission required before execution 2011-09-02 19:27:12 +01:00
stevenh
4c7d1459d2 Reworked command registration so that aliases are secondary to the primary command label requested
Updated docs to reflect what the code really does
This adds a few new methods to Command including:-
* A full constructor that takes descriptio, usageMassage and aliases for convenience
* getLabel() which returns the active label for a command, which is derived from the Command name or subsiquent call to setLabel(..)
* A number of registration functions for use in the CommandMap implementer
Also of note is Command.getAliases() no returns the "active" aliases
2011-05-22 20:42:26 +01:00
Erik Broes
992f1f2bf3 Whitespace + general cleanup 2011-05-15 14:06:02 +02:00
Dinnerbone
7867b27965 All previous deprecated methods removed (OH GOD EVERYTHING BROKEN) 2011-03-14 15:05:46 +00:00
Dinnerbone
0f95f3063a command.set/getDescription replaces a now deprecated set/getTooltip + javadocs 2011-02-28 11:42:09 +00:00
Dinnerbone
95d92e406e Tweaks to command system to allow setting executors via plugins (no more ambiguous onCommand in plugins) 2011-02-28 00:30:59 +00:00
stevenh
a89a96416b 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
VictorD
0951ed5de8 Updated commands to have optional aliases, and to fallback to /pluginName:cmdName on name conflict. 2011-01-18 01:12:50 +01:00