157 Commits

Author SHA1 Message Date
Kezz101
3528ca5475 Update /say to vanilla behaviour. Fixes BUKKIT-4224
Prior to this commit all /say command output would be a generic "[Server]"
prefixed line. This commit changes that by adding the source into the
message, such as a player. By doing this Bukkit more closely matches
vanilla behaviour and gives a more descriptive message to the client.
2013-09-10 19:40:03 -06:00
feildmaster
a2229f5d26 Make /spreadplayers command work. Fixes BUKKIT-4720 2013-09-09 20:03:15 -05:00
Kane York
94daac860a Use command block's world for /gamerule. Fixes BUKKIT-3274
In vanilla, gamerules are global, across all worlds. Maps created for
vanilla that use command blocks expect this behavior, which is broken
when they are placed on a world that is not the default world (world #0).

This commit changes that by using the command block's current world when
executing the command, forcing the game rules executed to be executed in
the world the command block is currently in.
2013-08-21 00:08:50 -06:00
Score_Under
84c6c70b90 [BREAKING] Use event class instead of event for timings. Fixes BUKKIT-4664
TimedRegisteredListener uses a reference to the first event fired. This
causes a memory leak in the server for any references that event has. This
changes TimedRegisteredListener to only store a reference to the class of
the event.

This change is intentionally a breaking change, as it is an obscure part
of the API. A non-breaking change would require the leak to be maintained
or an immediate update for any plugins using the method, as it would be an
indirect break.

A unit test is also included to check behavior of shared superclass
functionality.
2013-08-07 02:04:31 -05:00
Wesley Wolfe
6a779790eb Use player as point of reference for min volume. Fixes BUKKIT-4640
When the minimum volume is being used because the distance is over a
threshold, the unit vector delta should be added to the player's
location, instead of where the command specified location.

This change makes the player's location the point of reference for
playing sounds when distance to volume scale is lower than minimum
specified volume.
2013-08-03 18:26:31 -05:00
Wesley Wolfe
2f58bf8e3f Account for relative coordinates in PlaySound. Fixes BUKKIT-4639 2013-08-02 20:26:55 -05:00
h31ix
5c04714882 Add 1.6 effect clear functionality. Fixes BUKKIT-4473 2013-08-02 15:49:08 -05:00
h31ix
2f044fe1f8 Add 1.6 SpreadPlayers command. Fixes BUKKIT-4508 2013-08-02 15:38:55 -05:00
h31ix
8cc0d89751 Add 1.6 PlaySound command. Fixes BUKKIT-4489 2013-08-02 00:09:46 -05:00
mbax
2fb7b85434 Consider full team display name. Fixes BUKKIT-4186
Through a miscalculation, team display names were being created via
command ignoring the first word in the submitted display names.
2013-06-05 19:43:25 -05:00
Wesley Wolfe
a0b3182539 Pulling all pending Bukkit-JavaDoc changes 2013-05-16 04:41:09 -05:00
Wesley Wolfe
d5b5f84f0c Consider first player name in leave command. Fixes BUKKIT-4051 2013-04-11 22:56:31 -05:00
Wesley Wolfe
9f29723444 Consider arguments to team leave properly. Fixes BUKKIT-3994
Two checks to argument length were changed to properly consider if the
sender is a player instead of an off-by-one logical error.
2013-04-05 12:49:59 -05:00
Wesley Wolfe
e555c4d77e Use utility method for team-join display. Fixes BUKKIT-3997
The method to make a string from a collection of strings already exists
and should be used when adding multiple players to a team.
2013-04-05 12:40:03 -05:00
mbax
073bbd5979 Add Scoreboard API and Command. Adds BUKKIT-3776, BUKKIT-3834
The implementation is designed around having both a main scoreboard and
numberous plugin managed scoreboards that can be displayed to specific
players.

Plugin managed scoreboards are active so long as a reference is kept by a
plugin, or it has been registered as a player's active scoreboard. Objects
specific to a scoreboard remain active until unregistered (which remove a
reference to the owning scoreboard), but quickly fail if accessed
post-unregistration.
2013-04-03 23:32:54 -05:00
Edmond Poon
02d11a0525 Pulling all pending Bukkit-JavaDoc changes 2013-04-02 00:11:22 -04:00
feildmaster
01ec789162 Add Effect command. Adds BUKKIT-3763 2013-03-31 19:33:05 -05:00
Travis Watkins
1819a9e00e Add dummy /testfor command in Bukkit. Addresses BUKKIT-3813
This command only functions in command blocks so the bukkit command for it
simply spits out an error message.
2013-03-18 17:10:52 -05:00
feildmaster
f349e7a0ad Fix invalid integers in spawnpoint command. Fixes BUKKIT-3509
getInteger returns min value on illegal number formats, so we change
behavior to throw an exception when requested.
2013-01-26 13:54:00 -06:00
feildmaster
0d14642362 Don't try listing something that may not exist. Fixes BUKKIT-3471
The player name may not be provided, in which case the command will
fail hard.
2013-01-23 05:51:46 -06:00
feildmaster
05c2c55fce Improve javadoc in 26 files.
Addresses:
BUKKIT-1643, BUKKIT-1868, BUKKIT-1846, BUKKIT-2632, BUKKIT-3196,
BUKKIT-3187, BUKKIT-3198, BUKKIT-3200, BUKKIT-3201 and BUKKIT-3417.
2013-01-22 16:41:00 -06:00
Travis Watkins
df6049eaa1 Remove duplicate message for console. Fixes BUKKIT-3267 2012-12-23 02:33:25 -06:00
feildmaster
23854afbfe Apply commandBlockOutput to broadcastMessage. Addresses BUKKIT-3117 2012-12-18 04:47:56 -06:00
feildmaster
40117b8952 An executor set to null will now use the plugin. Fixes BUKKIT-3127 2012-12-09 00:31:25 -06:00
feildmaster
016217f791 Add getShutdownMessage() and stop command arguments. Adds BUKKIT-3031 2012-12-05 06:06:44 -06:00
EvilSeph
d9f9ca5127 Add ability to pass 'max' as 'level' for EnchantCommand. 2012-11-18 17:45:00 -05:00
EvilSeph
b854d0ee34 Add default EnchantCommand. Tim, The Enchanter - I AM DEATH! Adds BUKKIT-2961 2012-11-17 01:14:41 -05:00
EvilSeph
e1c0df5a82 Essential core commands shouldn't be overriden. Fixes BUKKIT-1546 2012-11-17 00:27:36 -05:00
EvilSeph
ceab221b8e Add aliases to TellCommand to bring us in line with Vanilla behaviour. 2012-11-15 23:04:45 -05:00
EvilSeph
fad6c476fe Remove unnecessary Overrides in Default commands. 2012-11-15 23:03:03 -05:00
EvilSeph
0adbd6c959 Made KillCommand set the player health to 0 to allow it to work in Creative. Fixes BUKKIT-2949 2012-11-15 22:52:10 -05:00
EvilSeph
f1ac9196bc Added proper feedback to default commands. 2012-11-15 22:52:04 -05:00
EvilSeph
44be0455cd Add yaw and rotation to default TeleportCommand. Fixes BUKKIT-2774 2012-10-31 22:02:47 -04:00
Travis Watkins
a764c850c1 Add BlockCommandSender for Command block 2012-10-31 10:54:53 -05:00
Wesley Wolfe
4f7ded55db Replace 'Magic Numbers' in commands.
These numbers are mirrored in vanilla code as the coordinate limits for
a world. Replaced usages to a static final member for code readability.
2012-10-31 04:19:11 -05:00
feildmaster
6b33364949 Add default GameRule command. Fixes BUKKIT-2671 2012-10-31 03:45:26 -04:00
EvilSeph
57ea30e152 Add default Clear command. Partially fixes BUKKIT-2671 2012-10-30 04:53:42 -04:00
EvilSeph
2d5ae73809 Revert "Clear" commit, was not meant to be pushed.
This reverts commit bdf5d326f5910993c1f7e48b4409f7b0d53c1926.
2012-10-30 02:50:38 -04:00
mbax
9907150d92 [Bleeding] Check for player validity in spawnpoint command. Fixes BUKKIT-2742 2012-10-30 02:11:14 -04:00
EvilSeph
94effa3f0e Clear 2012-10-30 01:18:01 -04:00
EvilSeph
8b5440766c Update ExpCommand with levels support. Fixes BUKKIT-2683 and partially fixes BUKKIT-2671 2012-10-29 23:18:18 -04:00
EvilSeph
2c63001a78 Add default SpawnpointCommand. Partially fixes BUKKIT-2671 2012-10-29 05:06:04 -04:00
EvilSeph
8cc80425f0 Add default WeatherCommand. Partially fixes BUKKIT-2671 2012-10-29 02:48:40 -04:00
EvilSeph
9ea682a4a1 Remove invalid tab completions from DefaultGameModeCommand as player names are not an accepted parameter. 2012-10-29 02:12:07 -04:00
EvilSeph
1f37a492b4 Add default DifficultyCommand. Partially fixes BUKKIT-2671 2012-10-29 01:53:31 -04:00
Travis Watkins
a446bb7e8f Update Bukkit for Minecraft 1.4(.2) changes. 2012-10-27 22:15:59 -04: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
Wesley Wolfe
b23edfd2d3 Let version print partial matches for plugin name. Addresses BUKKIT-2383
If no plugin is found with the given name, the version command will
search all loaded plugins to find a case insensitive partial match for
the specified name and print to the sender all matches.
2012-09-28 16:50:32 -05:00
feildmaster
3c91fdc121 Add spaces to gamemode message. Fixes BUKKIT-2148 2012-08-08 19:48:49 -05:00