Commit Graph

23 Commits

Author SHA1 Message Date
Feildmaster
a628d2faff Revert Plugin to Interface, added PluginBase
Fixed Tests, moved TestPlugin out of messaging
2012-02-29 20:59:56 -05:00
rmichela
a2c69f9f51 [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
Erik Broes
7a06777e19 Deprecation cleanup. 2012-02-18 13:05:58 -05:00
Tahg
53261190cf Updated timing code for new event system 2012-01-19 18:41:04 -05:00
rmichela
05173f2200 [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
Tahg
3d4c2010eb Added timings command. 2012-01-09 23:44:17 -05:00
Erik Broes
dce83b6ce4 Generic cleanup of warnings, whitespace and style. 2011-12-25 16:02:30 +01:00
Nathan Adams
d9c22be882 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
c97ea145ea Added reloadConfig() plugin method 2011-10-11 15:50:59 +01:00
Dinnerbone
55f405f4a8 Added new Configuration classes 2011-10-10 21:06:34 +01:00
Dinnerbone
e6c273e8b0 Many javadoc fixes thanks to Celtic Minstrel 2011-09-25 02:56:40 +01:00
Dinnerbone
5738f2e6fe Added new getDefaultWorldGenerator method to Plugin 2011-06-22 18:26:32 +01:00
Erik Broes
c4d444ce98 Whitespace + general cleanup 2011-05-15 14:06:02 +02:00
Dinnerbone
cf6b46bda9 Implemented ebeans 2011-04-01 16:09:23 +01:00
Erik Broes
d208614fcc Just NAG once, to be nice 2011-03-30 00:38:46 +02:00
Raphfrk
157f9d9d9f Adds an onLoad method to Plugin. The onLoad method is called for all plugins before the onEnable calls 2011-03-14 14:46:11 +00:00
Dinnerbone
4fa84d995c Tweaks to command system to allow setting executors via plugins (no more ambiguous onCommand in plugins) 2011-02-28 00:30:59 +00:00
stevenh
cc404ced12 Refactored event calling so its front loading avoiding the lookup for each event call.
This now uses an annoymous class implementing IExecutor that facilitates direct event method handler calling

Changed commands from being executed exclusively by a player to by a CommandSender to facilitate external command callers such as rcon

Fixed CustomEventListener

Merged in additional events

Added getFullName to PluginDescriptionFile which returns the combination of Name and Version

There's also a few bits of reformatting as it seems someones been editing with either tabs or dos eol :(
2011-01-29 16:23:56 +00:00
VictorD
7a9ecbef53 Updated commands to have optional aliases, and to fallback to /pluginName:cmdName on name conflict. 2011-01-18 01:12:50 +01:00
VictorD
f8335d6cab Added command registration to plugin config file. Registered commands are sent to the corresponding plugin.onCommand method when executed. 2011-01-16 16:30:34 +01:00
sk89q
fc63e38ea2 Plugin data folders are now no longer created by default. 2011-01-15 00:34:01 -08:00
sk89q
0373fe9fdc Added configuration and plugin data directory support to plugins. 2011-01-14 23:38:53 -08:00
Erik Broes
f46d9ada1c Transition to Maven 2011-01-01 11:23:14 +01:00