279 Commits

Author SHA1 Message Date
Wesley Wolfe
9e73a8887c Support asynchronous events; Addresses BUKKIT-1212 2012-06-13 23:01:03 -05:00
H31IX
ef1748ef68 Add PlayerToggleFlightEvent. Fixes BUKKIT-1696 2012-06-13 22:19:51 -05:00
feildmaster
062a3df78d Javadoc updates
Fixes BUKKIT-1653, Fixes BUKKIT-1383 and Fixes BUKKIT-1644
2012-06-03 05:40:54 -05:00
Travis Watkins
5a7f09f1a7 Add IgniteCause.FIREBALL for BUKKIT-1566 2012-05-09 01:41:47 -05:00
feildmaster
55c12d5dd5 Add SpawnReason.DEFAULT, to make SpawnReason.CUSTOM solely for plugins 2012-04-14 01:31:59 -05:00
feildmaster
92821498f0 Added SpawnReason.SLIME_SPLIT. Addresses BUKKIT-790 2012-04-14 00:59:29 -05:00
Wesley Wolfe
9030ba5f99 Adds address to PlayerLoginEvent; Addresses BUKKIT-431
This also deprecates old constructors left for compatibility. Address
will default to null in these cases.
2012-04-03 17:00:05 -05:00
feildmaster
979d54e78d [Bleeding] Added SpawnReason.BREEDING. Addresses BUKKIT-1356 2012-03-27 20:27:41 -04:00
Warren Loo
f520069aa6 Reverting the Drop API for now, we need to re-evalute this as it is causing too many issues and blocking releases.
This reverts commit 2d17b0c24e2de982c09ad6050a95db0fac70c3ad.
2012-03-27 19:54:54 -04:00
EvilSeph
2854528ba5 Added new MELTING DamageCause. Addresses BUKKIT-1244 2012-03-22 17:33:32 -04:00
Celtic Minstrel
066ccf6062 [Bleeding] Added getting and setting drops to all appropriate events. Fixes BUKKIT-397 and fixes BUKKIT-1252 2012-03-21 12:31:22 -04:00
Wesley Wolfe
e4ca064cdc [Bleeding] Add ExpBottleEvent; Addresses BUKKIT-888 2012-03-20 03:24:37 -04:00
Celtic Minstrel
f528e62a84 [Bleeding] CraftItemEvent.getInventory() now returns CraftingInventory for convenience. 2012-03-15 22:24:01 -04:00
Celtic Minstrel
74ff160f58 [Bleeding] Added ProjectileLaunchEvent. Addresses BUKKIT-284 2012-03-15 07:12:23 -04:00
feildmaster
d22352013f [Bleeding] Added EntityBreakDoorEvent. Fixes BUKKIT-1134 2012-03-11 16:28:40 -04:00
feildmaster
06e507f3c6 [Bleeding] Add new sub-event for target goals, and DEFEND_VILLAGE TargetReason. Fixes BUKKIT-935 2012-03-10 02:02:08 -05:00
SpaceManiac
bc60e182cd [Bleeding] Added getting the hostname a player used to log in. Addresses BUKKIT-984 2012-03-09 11:48:04 -05:00
EvilSeph
cb46f4b8fe Made zombie invasions fire CreatureSpawn event. Fixes BUKKIT-1090 2012-03-08 22:10:17 -05:00
EvilSeph
220d1bb453 Made iron golems fire CreatureSpawn event. Fixes BUKKIT-1089 2012-03-08 22:00:08 -05:00
Celtic Minstrel
d839b6d639 Fix javadoc errors/warnings 2012-02-29 21:31:28 -05:00
Celtic Minstrel
8a458ca273 [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).
2012-02-29 15:18:56 -05:00
EvilSeph
925bf6498c Fixed PlayerPortalEvent constructor. 2012-02-29 14:27:05 -05:00
James Clarke
42d8d07051 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.
2012-02-29 14:00:34 -05:00
Wesley Wolfe
ca7aab6f4f [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.
2012-02-29 10:23:16 -05:00
Wesley Wolfe
3440a1f2ee [Bleeding] Fixes deadlock issue and generic usage. Fixes BUKKIT-844 and fixes BUKKIT-854 2012-02-29 09:50:03 -05:00
TomyLobo
1876c12a79 Narrowed down the return type of most EntityEvent subclasses for convenience. Addresses BUKKIT-809 2012-02-28 21:57:17 -05:00
TomyLobo
93521af608 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.
2012-02-28 21:57:16 -05:00
Sam Wilson
ffb24d94b0 Add a CreateReason to PortalCreateEvent. Addresses BUKKIT-833 2012-02-26 15:19:29 -05:00
zml2008
56d628be91 Added service register and unregister events. Addresses BUKKIT-816 2012-02-26 12:15:36 -05:00
Celtic Minstrel
eb8632fca7 [Bleeding] Add constructor to BlockFromToEvent for dragon egg teleportation. Addresses BUKKIT-828 2012-02-25 19:10:28 -05:00
Celtic Minstrel
ce4a390b00 [Bleeding] Added EntityType to replace CreatureType. 2012-02-22 22:06:19 -05:00
Feildmaster
4475ea7718 [Bleeding] Added BlockGrowEvent. Addresses BUKKIT-104 2012-02-22 21:46:15 -05:00
Feildmaster
e0eb9f914b [Bleeding] getHandlers() is now abstract. 2012-02-21 14:26:14 -05:00
Feildmaster
99af2a1aad [Bleeding] Event no longer implements Serializable. 2012-02-19 04:10:07 -05:00
Feildmaster
070ae68360 [Bleeding] Remove deprecated events (EndermanPickup/Place). 2012-02-19 04:10:06 -05:00
Feildmaster
7288e2adb7 [Bleeding] Specify event name in exception. Addresses BUKKIT-778 2012-02-19 04:10:06 -05:00
Wesley Wolfe
79da5a149d [Bleeding] Added Enchantment and misc tests to ItemStack (de)serialization 2012-02-19 04:10:05 -05:00
SpaceManiac
d984f12931 [Bleeding] Added ability to unregister listeners, updated javadoc and
renamed allLists. Addresses BUKKIT-773
2012-02-18 21:36:06 -05:00
EvilSeph
43457430be Fixed Validate message. 2012-02-18 15:28:33 -05:00
EvilSeph
6ec92480a7 Updated EntityTeleportEvent in line with deprecation cleanup. 2012-02-18 13:13:50 -05:00
Erik Broes
049a7cc1d0 Deprecation cleanup. 2012-02-18 13:05:58 -05:00
Erik Broes
54004d7d47 Added RemoteServerCommandEvent. 2012-02-18 12:53:30 -05:00
EvilSeph
5c7edcf439 Added JOCKEY and CHUNK_GEN SpawnReasons. 2012-02-10 07:17:03 -05:00
Feildmaster
7df6a7e864 [Bleeding] setLastDamageCaused to ComplexEntityPart parent. 2012-02-09 19:52:53 -05:00
md_5
6efe9a85e5 [Bleeding] Add the ability for plugins to ignore cancelled events when
using the new event system.
2012-02-09 15:51:56 -05:00
Aidan Matzko
db15c58e31 [Bleeding] Deprecate Enderman events in favor of EntityChangeBlock 2012-02-09 11:32:12 -05:00
craftycreeper
4272a879f9 Added EntityTeleportEvent. Fixes BUKKIT-366 2012-02-09 03:20:08 -05:00
EvilSeph
d9ed0a0d33 Added SpawnReason.BUILD_SNOWMAN. 2012-02-08 18:27:49 -05:00
EvilSeph
f04e388d46 Added RegainReason.ENDER_CRYSTAL. 2012-02-08 10:54:30 -05:00
EvilSeph
2c37ce1367 setCancelled should probably not be hard-coded to true or it could put
fernferrets in danger of self-implosion.
2012-02-05 02:01:11 -05:00