231 Commits

Author SHA1 Message Date
Wesley Wolfe
e6539615a7 [Bleeding] Fixed soft-dependencies broken by previous commit. 2012-03-22 03:12:00 -04:00
Wesley Wolfe
aff0ded5a7 [Bleeding] Added loadbefore property; Addresses BUKKIT-843 2012-03-21 15:44:43 -04:00
Wesley Wolfe
2e01621c63 [Bleeding] Lazily calculate permissions. Addresses BUKKIT-1122 2012-03-15 06:46:02 -04:00
Wesley Wolfe
ff9fa6b32e [Bleeding] More lenient command creation from plugin.yml. Fixes BUKKIT-1093 2012-03-15 06:45:44 -04:00
Wesley Wolfe
b61d208c3c [Bleeding] Fixed naughty plugins crashing server. 2012-03-01 10:36:07 -05:00
Celtic Minstrel
d839b6d639 Fix javadoc errors/warnings 2012-02-29 21:31:28 -05:00
Feildmaster
0a106995d2 Revert Plugin to Interface, added PluginBase
Fixed Tests, moved TestPlugin out of messaging
2012-02-29 20:59:56 -05:00
Aidan Matzko
2fc2f8109c Add optional prefix value to plugin.yml. Addresses BUKKIT-838 2012-02-29 19:58:05 -05:00
rmichela
cd732ee3f7 [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.
2012-02-29 19:16:04 +01: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
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
EdGruberman
7e382b73bb Adjust plugin enable/disable logging 2012-02-26 15:45:17 -05:00
zml2008
56d628be91 Added service register and unregister events. Addresses BUKKIT-816 2012-02-26 12:15:36 -05:00
Wesley Wolfe
332e8cad5d [Bleeding] Exception cleanup. Addresses BUKKIT-774 2012-02-18 23:55:35 -05:00
Wesley Wolfe
db57cff67c [Bleeding] Skip InvocationTargetException. Addresses BUKKIT-774 2012-02-18 23:54:57 -05:00
Erik Broes
049a7cc1d0 Deprecation cleanup. 2012-02-18 13:05:58 -05:00
Wesley Wolfe
ae4eb7c46c [Bleeding] Update serialVersionUID. 2012-02-13 02:42:05 -05:00
Feildmaster
0706671a0a [Bleeding] Added ability to register and listen to SubEvents. Addresses
BUKKIT-585
2012-02-13 01:08:15 -05:00
Zeerix
f0f593c956 [Bleeding] Cleanup of exceptions org.bukkit.plugin.Invalid*
Removed throwable and message, because the superclass already stores them
Added message of inner exception to the outer exception to make the first line of the stacktrace more verbose
2012-02-13 01:05:18 -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
Meaglin
73a1c47854 Properly unregister plugin channels when a plugin gets disabled. 2012-02-09 03:49:51 -05:00
Nathan Adams
088762d67e onEnable and onDisable are no longer required implementations for JavaPlugins 2012-02-01 01:53:56 +00:00
EvilSeph
d7469ca79e Fixed plugin loader. Thanks Wolvereness! 2012-01-25 04:11:37 -05:00
Tahg
468d45b761 Updated timing code for new event system 2012-01-19 18:41:04 -05:00
Nathan Adams
92bbf8957c Added new PlayerExpChangeEvent and PlayerLevelChangeEvent events. Thanks to feildmaster for the PR. 2012-01-19 16:07:03 +00:00
Erik Broes
257e35d51c 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
81dc1c0a52 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
e542942d45 Minor cleanup 2012-01-17 19:51:27 +01:00
Nathan Adams
86f33b82c9 [Bleeding] Changed event system into a new, much faster design. Huge thanks to @zml2008 & @lahwran. 2012-01-17 19:46:22 +01:00
rmichela
5ca940b907 [Bleeding] Added Plugin.getLogger() which returns a java.util.Logger that prefixes messages with the plugin name.
Note: the server when enabling or disabling a plugin will now by default log this.
2012-01-17 19:45:36 +01:00
Erik Broes
88c17a7f86 Generic cleaning 2012-01-15 14:37:43 +01:00
Nathan Adams
bc95edd4dc Added "class-loader-of" field to plugin.yml. Big thanks to CmdrDats for the PR. 2012-01-15 12:54:06 +00:00
Nathan Adams
a10057b541 Added an EntityCreatePortalEvent 2012-01-15 11:58:03 +00:00
Feildmaster
42f7a6b8e4 Don't send events to disabled plugins. 2012-01-15 08:18:44 +00:00
Nathan Adams
b2f0af9499 Changed PluginDisableEvent to fire before the disabling of a plugin, instead of after (where it's then invalid). Thanks to holic for the PR. 2012-01-15 08:16:57 +00:00
Feildmaster
c16210e2e2 Added ItemDespawnEvent 2012-01-14 17:01:03 +00:00
Nathan Adams
88a1512ee3 Fixed nullcheck error message on null plugin (see previous commit) 2012-01-14 14:32:56 +00:00
Nathan Adams
63673c496f Nullcheck in registerEvent (thanks to an old PR by LRFLEW - I'm sorry for the wait!) 2012-01-14 14:31:00 +00:00
Nathan Adams
ce4f4af087 Implemented new Plugin Message API - see http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/ 2012-01-13 08:53:14 +00:00
Tahg
b063a7246a Added timings command. 2012-01-09 23:44:17 -05:00
Nathan Adams
76c23ee588 Fix NPE when saving config before the config is loaded - thanks to Wolvereness for the pull request 2012-01-07 15:11:22 +00:00
Erik Broes
c5063fa024 Minor text changes 2012-01-04 09:09:25 +01:00
Erik Broes
b9fca3c04d Generic cleanup of warnings, whitespace and style. 2011-12-25 16:02:30 +01:00
Nathan Adams
a345613cfa Added plugin saveResources + saveDefaultConfig methods. This completes a bleeding branch by deltahat at http://forums.bukkit.org/threads/branch-complete-savedefaultconfig.48721/ 2011-12-22 21:18:36 +00:00
Nathan Adams
a7beacd2ff Fixed silly NPE during shutdown when java becomes a meanie-pants and steals our lunch money :( 2011-12-09 17:14:00 +00:00
Nathan Adams
bbbda45739 Added onStructureGrow event, thanks to md-5. 2011-12-09 16:12:05 +00:00
Nathan Adams
47432229cf Fixed the fix of the fix of javaplugin.getResource 2011-11-22 00:03:16 +00:00
Nathan Adams
27beb951f0 Fixed getResource not working post-reload, thanks to feildmaster 2011-11-13 11:11:45 +00:00
Erik Broes
eefcef5480 Revert "Added the ability to register commands dynamically."
This reverts commit 737d6347b1d74e13191df7c521d8db30fa174c9b.
Because this is *NOT* how it should be.
2011-10-13 18:27:34 +02:00