summaryrefslogtreecommitdiffstats
path: root/src/test/java
Commit message (Collapse)AuthorAgeLines
* Add a tab completion API for chat messages. Adds BUKKIT-2607Wesley Wolfe2012-10-17-0/+28
| | | | | | This implementation provides access to a (mutable) list and the base message. Also provided is a convenience method for getting the last 'token' in the provided string.
* Add tab-completion API. Fixes BUKKIT-2181. Adds BUKKIT-2602Score_Under2012-10-16-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Change Player usage in unit tests to proxiesWesley Wolfe2012-08-10-767/+47
|
* Add API to get a players experience to level (getExpToLevel). Implements ↵feildmaster2012-07-11-0/+4
| | | | | | BUKKIT-1906 This is the total experience one needs to gain a level.
* Add an isValid() method to Entity. Addresses BUKKIT-810TomyLobo2012-06-28-0/+4
|
* Add LivingEntity.hasLineOfSight. Addresses BUKKIT-1255TomyLobo2012-06-23-0/+4
|
* Support asynchronous events; Addresses BUKKIT-1212Wesley Wolfe2012-06-13-0/+185
|
* Optimize ChatColor.getLastColors.Travis Watkins2012-05-16-0/+10
| | | | | | | | ChatColor searches from the start to the end of a string for chat format characters but this always has to search the entire string. By starting from the end of the string and working backwards we can stop searching once we find a color code or a reset code as any previous formatting is wiped out by these.
* Fix createSection getting sections from itself. Fixes BUKKIT-1513feildmaster2012-04-14-0/+21
|
* [Bleeding] Removing the last metadata item for a key now sets ↵rmichela2012-03-28-0/+9
| | | | hasMetadata(key) to false. Addresses BUKKIT-1380
* [Bleeding] MetadataBase now properly takes the metadata key into account ↵rmichela2012-03-28-0/+7
| | | | when computing hasMetadata(). Addresses BUKKIT-1211
* Added missing tests to TestPlayer.EvilSeph2012-03-22-0/+8
|
* [Bleeding] Fixed some issues with no-effect potions, and added more potion ↵Celtic Minstrel2012-03-21-30/+54
| | | | tests. Fixes BUKKIT-1251
* [Bleeding] Added ChatColor.translateAlternateColorCodes(). Addresses BUKKIT-1191rmichela2012-03-16-0/+8
|
* Updated tests with isBlocking().EvilSeph2012-03-14-0/+4
|
* Added Enchantment.conflictsWith() and EnchantmentTarget.includes(). ↵Celtic Minstrel2012-03-13-0/+5
| | | | Addresses BUKKIT-1159 and addresses BUKKIT-1160
* [Bleeding] ChatPaginator now preserves the color of a line after wrapping ↵rmichela2012-03-08-37/+46
| | | | the line of text. Fixes BUKKIT-1048
* [Bleeding] Added ConversationAbandonedEvent and supporting infrastructure. ↵rmichela2012-03-08-0/+11
| | | | Whenever a conversation exits, the ConversationAbandonedEvent is triggered with details about how the conversation ended and what, if anything caused it to end. Fixes BUKKIT-986
* [Bleeding] Added Help API. Addresses BUKKIT-863rmichela2012-03-01-0/+161
|
* [Bleeding] Added Conversations API. Addresses BUKKIT-864rmichela2012-03-01-0/+381
|
* [Bleeding] Added sharp() and natural() factory functions to mirror the ↵Celtic Minstrel2012-02-29-2/+58
| | | | flat() one, sharped() and flattened() functions to get a note from an existing note, a toString(), and more tests. Addresses BUKKIT-861
* Revert Plugin to Interface, added PluginBaseFeildmaster2012-02-29-31/+7
| | | | Fixed Tests, moved TestPlugin out of messaging
* [Bleeding] Inventory framework and events. Addresses BUKKIT-856Celtic Minstrel2012-02-29-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New events: - InventoryOpenEvent - InventoryClickEvent - detects any clicks on a slot or outside the window - In the creative inventory view, only clicks on the quickbar are detected - InventoryCloseEvent - BrewEvent - when a potion finishes brewing - CraftItemEvent (a subevent of InventoryClickEvent) - fired when taking the crafted item - PrepareItemCraftEvent - fired just before updating the result slot Changes to existing events: - EnchantItemEvent extends InventoryEvent and also has a new whichButton() method - PrepareItemEnchantEvent also extends InventoryEvent - FurnaceBurnEvent and FurnaceSmeltEvent now extend BlockEvent (as does BrewEvent) - PlayerInventoryEvent is deprecated (though it never did anything anyway) New subclasses of Inventory: - BrewerInventory - CraftingInventory - DoubleChestInventory - EnchantingInventory - FurnaceInventory New methods in Inventory: - getViewers() - getTitle() - getType() - getHolder() - iterator() - Yes, inventories are now iterable! - The iterator is a ListIterator that does not support add or remove New methods in Player: - getOpenInventory() - openInventory() - openWorkbench() - openEnchanting() - closeInventory() - setWindowProperty() - getItemOnCursor() - setItemOnCursor() Other changes: - createInventory() methods in Server to make inventories not linked to an object - ContainerBlock is deprecated in favour of InventoryHolder - New InventoryView class gives direct access to an inventory window! - Removed the Slot class which did nothing and was used nowhere Some small credit goes to Afforess (initial conception of openInventory() methods) and Drakia (initial conception of InventoryOpenEvent and InventoryCloseEvent).
* Implementation of richer playEffect methods. Addresses BUKKIT-857Celtic Minstrel2012-02-29-0/+4
|
* [Bleeding] Added a Metadata framework for Entities, Blocks, and Worldsrmichela2012-02-29-4/+444
| | | | | | | | | | | | | | | | | | | | This metadata implementation has the following features: - All metadata is lazy. Metadata values are not actually computed until another plugin requests them. Memory and CPU are conserved by not computing and storing unnecessary metadata values. - All metadata is cached. Once a metadata value is computed its value is cached in the metadata store to prevent further unnecessary computation. An invalidation mechanism is provided to flush the cache and force recompilation of metadata values. - All metadata is stored in basic data types. Convenience methods in the MetadataValue class allow for the conversion of metadata data types when possible. Restricting metadata to basic data types prevents the accidental linking of large object graphs into metadata. Metadata is persistent across the lifetime of the application and adding large object graphs would damage garbage collector performance. - Metadata access is thread safe. Care has been taken to protect the internal data structures and access them in a thread safe manner. - Metadata is exposed for all objects that descend from Entity, Block, and World. All Entity and World metadata is stored at the Server level and all Block metadata is stored at the World level. - Metadata is NOT keyed on references to original objects - instead metadata is keyed off of unique fields within those objects. Doing this allows metadata to exist for blocks that are in chunks not currently in memory. Additionally, Player objects are keyed off of player name so that Player metadata remains consistent between logins. - Metadata convenience methods have been added to all Entities, Players, Blocks, BlockStates, and World allowing direct access to an individual instance's metadata. - Players and OfflinePlayers share a single metadata store, allowing player metadata to be manipulated regardless of the player's current online status.
* [Bleeding] Cleaned up unsafe casts. Addresses BUKKIT-844Wesley Wolfe2012-02-29-1/+1
| | | | | | | | | | Removed internal collection leaks from PluginDescriptionFile BREAKING: PluginDescriptionFile.getAuthors() now returns List instead of ArrayList Various places with unsafe generics, notably List<Object> getList() in Configurations are now referenced as <?>. This is nonbreaking, but sourcecode will need to be revised when compiled.
* [Bleeding] Fixed potion tests.Celtic Minstrel2012-02-25-13/+28
|
* [Bleeding] Add missing methods to Bukkit class, fix non-static methods, and ↵Celtic Minstrel2012-02-25-0/+19
| | | | add a junit test to ensure both these problems will be caught in future.
* [Bleeding] Added launchProjectile.aPunch2012-02-23-0/+5
| | | | Use launchProjectile in place of individual throwSnowball, throwEgg, and shootArrow methods
* [Bleeding] Added EntityType to replace CreatureType.Celtic Minstrel2012-02-22-0/+5
|
* [Bleeding] Added Enchantment and misc tests to ItemStack (de)serializationWesley Wolfe2012-02-19-0/+76
|
* Deprecation cleanup.Erik Broes2012-02-18-45/+0
|
* [Bleeding] Added Potions API. Fixes BUKKIT-389fullwall2012-02-10-0/+136
|
* [Bleeding] Added Vanish API for hiding players from each other.Travis Watkins2012-02-03-0/+12
| | | | | | | Adds Player.hidePlayer, Player.showPlayer, and Player.canSee for managing what players are hidden from a player. When someone is hidden from a player the player cannot see them in the user list or /list and they cannot /tell them so they appear to be completely gone from the server.
* Add some testingErik Broes2012-01-29-29/+491
|
* Add Player.setBedSpawnLocation(Location). Thanks md_5Erik Broes2012-01-17-0/+4
|
* [Bleeding] Changed event system into a new, much faster design. Huge thanks ↵Nathan Adams2012-01-17-5/+5
| | | | to @zml2008 & @lahwran.
* [Bleeding] Added Plugin.getLogger() which returns a java.util.Logger that ↵rmichela2012-01-17-0/+5
| | | | | | prefixes messages with the plugin name. Note: the server when enabling or disabling a plugin will now by default log this.
* Added ChatColor.MAGIC, changed to char based values and deprecated old ↵Nathan Adams2012-01-16-0/+58
| | | | methods. Added unit tests for ChatColor
* Generic cleaningErik Broes2012-01-15-40/+39
|
* Configurations now properly support lists of serializable objects, and ↵Nathan Adams2012-01-15-0/+29
| | | | ItemStack is properly serializable. Big thanks to GICodeWarrior for the PR. This fixes BUKKIT-425
* Added Player set/getAllowFlight methods. Thanks to Qala for the PR.Nathan Adams2012-01-15-0/+8
|
* Fix unambiguous importErik Broes2012-01-15-1/+0
|
* Added entity.playEffect, thanks to main-- in an (unfortunately old) PR.Nathan Adams2012-01-14-10/+5
|
* Implemented new Plugin Message API - see ↵Nathan Adams2012-01-13-0/+1038
| | | | http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/
* Fixed YamlConfiguration creating empty lines when reading a file with no ↵Nathan Adams2012-01-08-4/+25
| | | | contents, and made it trim the initial newlines of any existing config header
* Generic cleanup of warnings, whitespace and style.Erik Broes2011-12-25-106/+100
|
* Configuration methods .getX (int/double/etc) now try to cast existing values ↵Nathan Adams2011-12-12-2/+14
| | | | where possible. This fixes BUKKIT-290
* Removed redundant TestEnum fileNathan Adams2011-11-13-1/+0
|
* Added createSection(String path, Map<String, object> map)Feildmaster2011-11-05-1/+14
|