Commit Graph

265 Commits

Author SHA1 Message Date
feildmaster
1f91dc694a [Bleeding] Added EntityBreakDoorEvent. Fixes BUKKIT-1134 2012-03-11 16:28:40 -04:00
feildmaster
37f1ab2052 [Bleeding] Add new sub-event for target goals, and DEFEND_VILLAGE TargetReason. Fixes BUKKIT-935 2012-03-10 02:02:08 -05:00
SpaceManiac
6c1f2489ad [Bleeding] Added getting the hostname a player used to log in. Addresses BUKKIT-984 2012-03-09 11:48:04 -05:00
EvilSeph
3e3a05000d Made zombie invasions fire CreatureSpawn event. Fixes BUKKIT-1090 2012-03-08 22:10:17 -05:00
EvilSeph
5f7c0aec5f Made iron golems fire CreatureSpawn event. Fixes BUKKIT-1089 2012-03-08 22:00:08 -05:00
Celtic Minstrel
17403d617a Fix javadoc errors/warnings 2012-02-29 21:31:28 -05:00
Celtic Minstrel
0b77483c2f [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
50bd232814 Fixed PlayerPortalEvent constructor. 2012-02-29 14:27:05 -05:00
James Clarke
09fa3a4c59 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
7db0e50da7 [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
a60a7b6bf7 [Bleeding] Fixes deadlock issue and generic usage. Fixes BUKKIT-844 and fixes BUKKIT-854 2012-02-29 09:50:03 -05:00
TomyLobo
2e12e3ec8a Narrowed down the return type of most EntityEvent subclasses for convenience. Addresses BUKKIT-809 2012-02-28 21:57:17 -05:00
TomyLobo
6c7fb871c5 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
884a2fe4c8 Add a CreateReason to PortalCreateEvent. Addresses BUKKIT-833 2012-02-26 15:19:29 -05:00
zml2008
e891176aa7 Added service register and unregister events. Addresses BUKKIT-816 2012-02-26 12:15:36 -05:00
Celtic Minstrel
c7508cd097 [Bleeding] Add constructor to BlockFromToEvent for dragon egg teleportation. Addresses BUKKIT-828 2012-02-25 19:10:28 -05:00
Celtic Minstrel
cbb9bc0fa3 [Bleeding] Added EntityType to replace CreatureType. 2012-02-22 22:06:19 -05:00
Feildmaster
4b9f306913 [Bleeding] Added BlockGrowEvent. Addresses BUKKIT-104 2012-02-22 21:46:15 -05:00
Feildmaster
c568f49c24 [Bleeding] getHandlers() is now abstract. 2012-02-21 14:26:14 -05:00
Feildmaster
ca71be0228 [Bleeding] Event no longer implements Serializable. 2012-02-19 04:10:07 -05:00
Feildmaster
219d005e1d [Bleeding] Remove deprecated events (EndermanPickup/Place). 2012-02-19 04:10:06 -05:00
Feildmaster
b09c56d57d [Bleeding] Specify event name in exception. Addresses BUKKIT-778 2012-02-19 04:10:06 -05:00
Wesley Wolfe
08eed206b1 [Bleeding] Added Enchantment and misc tests to ItemStack (de)serialization 2012-02-19 04:10:05 -05:00
SpaceManiac
45833c282d [Bleeding] Added ability to unregister listeners, updated javadoc and
renamed allLists. Addresses BUKKIT-773
2012-02-18 21:36:06 -05:00
EvilSeph
9a80e7630a Fixed Validate message. 2012-02-18 15:28:33 -05:00
EvilSeph
2b137c5a9b Updated EntityTeleportEvent in line with deprecation cleanup. 2012-02-18 13:13:50 -05:00
Erik Broes
7a06777e19 Deprecation cleanup. 2012-02-18 13:05:58 -05:00
Erik Broes
52822729b0 Added RemoteServerCommandEvent. 2012-02-18 12:53:30 -05:00
EvilSeph
17517673ba Added JOCKEY and CHUNK_GEN SpawnReasons. 2012-02-10 07:17:03 -05:00
Feildmaster
6b119f2dbb [Bleeding] setLastDamageCaused to ComplexEntityPart parent. 2012-02-09 19:52:53 -05:00
md_5
4c8cd25d91 [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
623ddc1bdd [Bleeding] Deprecate Enderman events in favor of EntityChangeBlock 2012-02-09 11:32:12 -05:00
craftycreeper
71eb1b25bb Added EntityTeleportEvent. Fixes BUKKIT-366 2012-02-09 03:20:08 -05:00
EvilSeph
8caca5f10d Added SpawnReason.BUILD_SNOWMAN. 2012-02-08 18:27:49 -05:00
EvilSeph
4ac909792f Added RegainReason.ENDER_CRYSTAL. 2012-02-08 10:54:30 -05:00
EvilSeph
b5a19bb632 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
EvilSeph
50939e7769 Added Spawner Egg support to CreatureSpawnEvent. 2012-02-05 01:54:27 -05:00
EvilSeph
e2d27670cf Adhere to naming conventions. 2012-01-25 02:10:02 -05:00
EvilSeph
6e754de221 This will be re-added after the RB. 2012-01-25 02:08:00 -05:00
Mike Primm
1a9118f8d2 [Bleeding] Added EnchantmentTable API. 2012-01-24 06:13:48 -05:00
Zeerix
2b9c374865 [Bleeding] Added PotionSplashEvent for splash potions. Closes BUKKIT-307 2012-01-24 02:11:38 -05:00
Aidan Matzko
3a7c82f7cd [Bleeding] Added Sheep, Shear and EntityChangeBlock API. Thanks tips48! Closes BUKKIT-512 2012-01-23 18:57:37 -05:00
Tahg
53261190cf Updated timing code for new event system 2012-01-19 18:41:04 -05:00
Nathan Adams
c82666738f Added new PlayerExpChangeEvent and PlayerLevelChangeEvent events. Thanks to feildmaster for the PR. 2012-01-19 16:07:03 +00:00
Erik Broes
792d2601e6 Use the type of the eventhandler method's parameter as type rather than specificing it. Thanks zml2008. 2012-01-19 08:13:49 +01:00
zml2008
a4ff34607b Added a default to EventHandler.priority()
Fixed HandlerList.unregisterAll()
Fixed incorrect isAssignableFrom check in SimplePluginManager.getRegistrationClass()
2012-01-18 14:46:15 +01:00
Erik Broes
0062c83d81 Minor cleanup 2012-01-17 19:51:27 +01:00
Erik Broes
d57776f058 [Bleeding] Added EntityShootBowEvent. Thanks Zeerix. 2012-01-17 19:51:11 +01:00
Zeerix
fb45b3295b [Bleeding] Added DamageCause.POISON/MAGIC and RegainReason.MAGIC/MAGIC_REGEN for potions 2012-01-17 19:49:06 +01:00
Nathan Adams
e35037ab50 [Bleeding] Changed event system into a new, much faster design. Huge thanks to @zml2008 & @lahwran. 2012-01-17 19:46:22 +01:00