Commit graph

1000 commits

Author SHA1 Message Date
Bukkit/Spigot
15e2f69fa6 Adding/expanding documentation
By: Celtic Minstrel <celtic.minstrel.ca@some.place>
2012-02-26 12:13:30 -05:00
Bukkit/Spigot
795a61bbeb Fix javadoc errors/warnings
By: Celtic Minstrel <celtic.minstrel.ca@some.place>
2012-02-26 10:35:17 -05:00
Bukkit/Spigot
5ebb8d2b3e Revert Plugin to Interface, added PluginBase
Fixed Tests, moved TestPlugin out of messaging

By: Feildmaster <admin@feildmaster.com>
2012-02-29 18:46:09 -06:00
Bukkit/Spigot
fa6a95bc3f [Bleeding] Optimized locToBlock. Addresses BUKKIT-815
By: Wesley Wolfe <weswolf@aol.com>
2012-02-29 16:07:47 -06:00
Bukkit/Spigot
43002d0cbb Add optional prefix value to plugin.yml. Addresses BUKKIT-838
By: Aidan Matzko <amatzko48@gmail.com>
2012-02-26 18:36:03 -05:00
Bukkit/Spigot
b004c409f0 Re-added launchProjectile lost due to incorrect conflict resolution.
By: EvilSeph <evilseph@gmail.com>
2012-02-29 18:31:20 -05:00
Bukkit/Spigot
c180de46e2 [Bleeding] Inventory framework and events. Addresses BUKKIT-856
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).

By: Celtic Minstrel <celtic.minstrel.ca@some.place>
2012-02-29 13:32:33 -05:00
Bukkit/Spigot
da943825be Implementation of richer playEffect methods. Addresses BUKKIT-857
By: Celtic Minstrel <celtic.minstrel.ca@some.place>
2012-02-26 12:53:31 -05:00
Bukkit/Spigot
27fb3d2fea Fixed PlayerPortalEvent constructor.
By: EvilSeph <evilseph@gmail.com>
2012-02-29 14:27:05 -05:00
Bukkit/Spigot
c2e4349767 Added NETHER_PORTAL and END_PORTAL to the TeleportCause enum. Addresses BUKKIT-265
Added new NETHER_PORTAL and END_PORTAL values to the TeleportCause enum
and relevant constructor for PlayerPortalEvent.

By: James Clarke <jamesrtclarke@me.com>
2012-02-15 19:54:01 +00:00
Bukkit/Spigot
93e9f175c4 Fixed null pointer exception in config.getMapList().
By: Kevin <kingersoll@gmail.com>
2012-02-28 21:20:32 -08:00
Bukkit/Spigot
38c5de3e6e Moved getVehicle, leaveVehicle and isInsideVehicle from LivingEntity to Entity. Addresses BUKKIT-811
By: TomyLobo <tomylobo@nurfuerspam.de>
2011-10-25 15:56:23 +02:00
Bukkit/Spigot
dd1bee786b [Bleeding] Added a Metadata framework for Entities, Blocks, and Worlds
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.

By: rmichela <deltahat@gmail.com>
2011-12-08 00:33:33 -05:00
Bukkit/Spigot
5906da7948 [Bleeding] Cleaned up unsafe casts. Addresses BUKKIT-844
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.

By: Wesley Wolfe <weswolf@aol.com>
2012-02-29 08:32:25 -06:00
Bukkit/Spigot
e7c9a43100 [Bleeding] Fixed file handle leak in /timings command. Addresses BUKKIT-853
By: Score_Under <seejay.11@gmail.com>
2012-02-25 17:39:54 +00:00
Bukkit/Spigot
9ebb2f13de [Bleeding] Fixes deadlock issue and generic usage. Fixes BUKKIT-844 and fixes BUKKIT-854
By: Wesley Wolfe <weswolf@aol.com>
2012-02-29 08:29:22 -06:00
Bukkit/Spigot
2fa5a7033a [Bleeding] Fixed MapPalette.imageToBytes to properly handle transparency. Addresses BUKKIT-852
By: SpaceManiac <tad.hardesty@platymuus.com>
2012-02-25 22:44:09 -06:00
Bukkit/Spigot
38fd1dd5f0 Narrowed down the return type of most EntityEvent subclasses for convenience. Addresses BUKKIT-809
By: TomyLobo <tomylobo@nurfuerspam.de>
2012-02-28 04:59:09 -06:00
Bukkit/Spigot
345f24b35c Event system optimizations. Addresses BUKKIT-813
- Made the handlers field a simple array instead of an array of arrays.
- Got rid of the "baked" field.

By: TomyLobo <tomylobo@nurfuerspam.de>
2012-02-28 19:37:27 -06:00
Bukkit/Spigot
4c1a926d66 Reduced excessive exception handling in NumberConversions. Addresses BUKKIT-825
This also allows, for instance, to parse complex numbers with imaginary part=0, if the according toString method omits zero components.
This also saves some unboxing (Foo.valueOf returns a wrapper, while Foo.parseFoo returns a primitive)

By: TomyLobo <tomylobo@nurfuerspam.de>
2012-02-25 16:25:42 +01:00
Bukkit/Spigot
445baa7607 Added missing BlockState functions. Addresses BUKKIT-807
By: TomyLobo <stabelweb@gmx.de>
2012-02-22 20:08:55 +01:00
Bukkit/Spigot
3b9e2f4a67 Adjust plugin enable/disable logging
By: EdGruberman <ed@rjump.com>
2012-02-15 12:11:10 -07:00
Bukkit/Spigot
2e383f96df Add a CreateReason to PortalCreateEvent. Addresses BUKKIT-833
By: Sam Wilson <sam.wilson@gmail.com>
2011-12-25 22:11:15 -08:00
Bukkit/Spigot
860011dcc1 Added service register and unregister events. Addresses BUKKIT-816
By: zml2008 <zach@zachsthings.com>
2011-11-12 20:22:30 -08:00
Bukkit/Spigot
1d03cfb423 [Bleeding] Add constructor to BlockFromToEvent for dragon egg teleportation. Addresses BUKKIT-828
By: Celtic Minstrel <celtic.minstrel.ca@some.place>
2012-02-25 12:49:46 -05:00
Bukkit/Spigot
ed0584f930 [Bleeding] Fixed potion tests.
By: Celtic Minstrel <celtic.minstrel.ca@some.place>
2012-02-25 17:57:42 -05:00
Bukkit/Spigot
e1b9154af1 [Bleeding] Add missing methods to Bukkit class, fix non-static methods, and add a junit test to ensure both these problems will be caught in future.
By: Celtic Minstrel <celtic.minstrel.ca@some.place>
2012-02-25 12:39:10 -05:00
Bukkit/Spigot
716821eebc [Bleeding] Add ability for the Potion class to represent no-effect
potions. Addresses BUKKIT-817

- Potion's type can be null
- Add Potion.setType()
- New Potion constructors which do not take a PotionType parameter
- Potion constructor chainers splash() and extend() added
- Add PotionType.getMaxLevel() and PotionType.isInstant()
- Add PotionType.WATER which is a very special case
- Make PotionType.getDamageValue() public

By: Celtic Minstrel <celtic.minstrel.ca@some.place>
2012-02-24 23:18:13 -05:00
Bukkit/Spigot
eb66333089 [Bleeding] Deprecate the pointless Potion.Tier enum in favour of a numeric level. Addresses BUKKIT-818
By: Celtic Minstrel <celtic.minstrel.ca@some.place>
2012-02-24 23:17:36 -05:00
Bukkit/Spigot
0e6ed242be Updated README.md with more coding and pull request conventions and tips to get your pull request accepted.
By: EvilSeph <evilseph@gmail.com>
2012-02-24 00:08:31 -05:00
Bukkit/Spigot
2f03671311 [Bleeding] Fixed EntityType errors. Fixes BUKKIT-800
By: Feildmaster <admin@feildmaster.com>
2012-02-23 14:13:33 -06:00
Bukkit/Spigot
80e59821f3 [Bleeding] Fix deserialization for unsafe enchantments. Fixes BUKKIT-793
By: Wesley Wolfe <weswolf@aol.com>
2012-02-23 02:23:05 -06:00
Bukkit/Spigot
7046df03bc [Bleeding] Added launchProjectile.
Use launchProjectile in place of individual throwSnowball, throwEgg, and shootArrow methods

By: aPunch <alexpuncochar@yahoo.com>
2012-02-16 15:14:12 -06:00
Bukkit/Spigot
6e054ddf7f [Bleeding] Added EntityType to replace CreatureType.
By: Celtic Minstrel <celtic.minstrel.ca@some.place>
2012-02-14 23:52:38 -05:00
Bukkit/Spigot
c6050ff89d [Bleeding] Added BlockGrowEvent. Addresses BUKKIT-104
By: Feildmaster <admin@feildmaster.com>
2012-02-11 23:09:10 -06:00
Bukkit/Spigot
2a1eddc441 [Bleeding] getHandlers() is now abstract.
By: Feildmaster <admin@feildmaster.com>
2012-02-19 15:52:46 -06:00
Bukkit/Spigot
07ccb2a000 [Bleeding] Add ways to retrieve and delete crafting recipes and fixed some issues with the existing recipe API.
- New recipe iterator which enables deleting specific recipes
- Functions to delete all recipes or revert to vanilla recipe set
- Fixed the recipes API; you should now be able to define recipes that take brewed potions!
- Fetch all recipes that result in a specific item

By: Celtic Minstrel <celtic.minstrel.ca@some.place>
2011-07-23 23:18:58 -04:00
Bukkit/Spigot
8bc2cf4969 [Bleeding] Cleanup clone methods.
By: Wesley Wolfe <weswolf@aol.com>
2012-02-14 01:49:06 -06:00
Bukkit/Spigot
ec40583deb Improved readability for /whitelist list. Addresses BUKKIT-772
By: Feildmaster <admin@feildmaster.com>
2012-02-18 15:04:02 -06:00
Bukkit/Spigot
e4de1795db [Bleeding] Event no longer implements Serializable.
By: Feildmaster <admin@feildmaster.com>
2012-02-19 01:25:46 -06:00
Bukkit/Spigot
0fd379166c [Bleeding] Remove deprecated events (EndermanPickup/Place).
By: Feildmaster <admin@feildmaster.com>
2012-02-19 01:25:11 -06:00
Bukkit/Spigot
539aedf219 [Bleeding] Specify event name in exception. Addresses BUKKIT-778
By: Feildmaster <admin@feildmaster.com>
2012-02-19 02:49:51 -06:00
Bukkit/Spigot
a23dfcdc7e [Bleeding] Added Enchantment and misc tests to ItemStack (de)serialization
By: Wesley Wolfe <weswolf@aol.com>
2012-02-16 14:37:57 -06:00
Bukkit/Spigot
95dc319bed [Bleeding] Added Enchantment and misc tests to ItemStack (de)serialization
By: Wesley Wolfe <weswolf@aol.com>
2012-02-16 14:37:57 -06:00
Bukkit/Spigot
e106970af9 [Bleeding] Fixed class cast in ItemStack deserialization. Fixes BUKKIT-777
By: Wesley Wolfe <weswolf@aol.com>
2012-02-15 20:40:58 -06:00
Bukkit/Spigot
b58168b112 [Bleeding] Exception cleanup. Addresses BUKKIT-774
By: Wesley Wolfe <weswolf@aol.com>
2012-02-18 17:15:59 -06:00
Bukkit/Spigot
91c8bbacc7 [Bleeding] Skip InvocationTargetException. Addresses BUKKIT-774
By: Wesley Wolfe <weswolf@aol.com>
2012-02-16 18:14:39 -06:00
Bukkit/Spigot
cfccd9341c [Bleeding] Added ability to unregister listeners, updated javadoc and
renamed allLists. Addresses BUKKIT-773

By: SpaceManiac <tad.hardesty@platymuus.com>
2012-02-18 15:41:18 -06:00
Bukkit/Spigot
9f2ca0a844 Add getEntitiesByClass(Class<T>) and getEntitiesByClasses(Class<?>...), deprecate getEntitiesByClass(Class<T>...)
By: Mike Primm <mike@primmhome.com>
2012-01-27 21:47:16 -06:00
Bukkit/Spigot
91946d8857 Fixed Validate message.
By: EvilSeph <evilseph@gmail.com>
2012-02-18 15:28:33 -05:00