Commit graph

990 commits

Author SHA1 Message Date
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
Bukkit/Spigot
4608ec4504 Updated EntityTeleportEvent in line with deprecation cleanup.
By: EvilSeph <evilseph@gmail.com>
2012-02-18 13:13:50 -05:00
Bukkit/Spigot
75fd934339 Deprecation cleanup.
By: Erik Broes <erikbroes@grum.nl>
2012-01-30 21:32:48 +01:00
Bukkit/Spigot
fe4de0bb01 Added RemoteServerCommandEvent.
By: Erik Broes <erikbroes@grum.nl>
2012-01-30 21:52:41 +01:00
Bukkit/Spigot
f7d527adf9 [Bleeding] Made PotionEffectTypes final, added reasons for deprecation.
Fixes BUKKIT-768 and BUKKIT-769

By: fullwall <fullwall@optusnet.com>
2012-02-15 16:21:49 +08:00
Bukkit/Spigot
86550000ce Updated version to 1.1-R5-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2012-02-13 14:29:32 -05:00
Bukkit/Spigot
bc459fa3f0 Updated version to 1.1-R4 in pom.xml for RB.
By: EvilSeph <evilseph@gmail.com>
2012-02-13 11:31:29 -05:00
Bukkit/Spigot
63464c3bb0 [Bleeding] Update serialVersionUID.
By: Wesley Wolfe <weswolf@aol.com>
2012-02-13 01:22:39 -06:00
Bukkit/Spigot
4e48b4725f [Bleeding] Added ability to register and listen to SubEvents. Addresses
BUKKIT-585

By: Feildmaster <admin@feildmaster.com>
2012-01-25 09:49:12 -06:00
Bukkit/Spigot
6492eb9683 [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

By: Zeerix <zeerix@draig.de>
2012-02-11 02:16:16 +01:00
Bukkit/Spigot
e204abd0f0 Allow cloning ItemStacks with unsafe enchantments. Fixes BUKKIT-621
Prevents "IllegalArgumentException: Specified enchantment cannot be applied to this itemstack").

By: mushroomhostage <mushroomhostage@yahoo.com>
2012-02-10 17:53:22 -08:00
Bukkit/Spigot
b7a973b822 Fixed typos and add usage message to timings command.
By: Travis Watkins <amaranth@ubuntu.com>
2012-02-10 13:48:53 -06:00
Bukkit/Spigot
a66baab794 [Bleeding] Added Potions API. Fixes BUKKIT-389
By: fullwall <fullwall@optusnet.com>
2012-01-09 14:39:06 +08:00