Commit Graph

856 Commits

Author SHA1 Message Date
Kristian S. Stangeland
10e5508c8a Updating JavaDoc to include sync/async information. 2012-09-19 03:49:49 +02:00
Kristian S. Stangeland
f232823820 Merge branch 'master' into gh-pages 2012-09-19 03:49:04 +02:00
Kristian S. Stangeland
bc7b395889 Adding desperately needed async/sync documentation. 2012-09-19 03:48:46 +02:00
Kristian S. Stangeland
a76e5835fd Regenerated JavaDoc. 2012-09-18 18:41:24 +02:00
Kristian S. Stangeland
cdcb7ce656 Merge branch 'master' into gh-pages 2012-09-18 18:40:48 +02:00
Kristian S. Stangeland
77376a2fa3 Make the Bukkit unwrapper use the actual return type. 2012-09-18 18:37:11 +02:00
Kristian S. Stangeland
99b9dc90ae Adding the new javadoc. 2012-09-18 17:27:59 +02:00
Kristian S. Stangeland
cd9fa1cdf6 Fixing documentation. 2012-09-18 17:20:48 +02:00
Kristian S. Stangeland
ad6fbae5d6 Incrementing to version 1.1.0 2012-09-18 17:17:20 +02:00
Kristian S. Stangeland
8f9939f65c Added the ability to refresh the apperance of entities and players. 2012-09-18 16:30:46 +02:00
Kristian S. Stangeland
3783328cb1 Forgot to convert the types to NMS. 2012-09-18 02:16:11 +02:00
Kristian S. Stangeland
140edabb4e Fixed packet constructor and tons of other bugs. 2012-09-18 02:04:26 +02:00
Kristian S. Stangeland
ffbaed283a Improved the API slightly. 2012-09-18 00:01:02 +02:00
Kristian S. Stangeland
e5beca4ea5 And the PacketConstructor class itself. 2012-09-17 22:59:41 +02:00
Kristian S. Stangeland
fb15ee1b22 Adding packet constructors.
This should simplify a lot of code.
2012-09-17 22:59:20 +02:00
Kristian S. Stangeland
7a60c5aac7 Made the server registry static. 2012-09-17 16:40:08 +02:00
Kristian S. Stangeland
f74a6e9832 Made the packet ids static and thus usable in a switch statement. 2012-09-17 16:38:26 +02:00
Kristian S. Stangeland
381484fc5d Adding a simple packet registry. 2012-09-17 16:21:15 +02:00
Kristian S. Stangeland
455ffca63f Adding a entity structure modifier. 2012-09-17 01:34:10 +02:00
Kristian S. Stangeland
286e1159e9 Made certain classes private. No need to expose them to the API. 2012-09-16 03:18:58 +02:00
Kristian S. Stangeland
62d9afd1d1 Readme spelling. 2012-09-16 02:43:31 +02:00
Kristian S. Stangeland
59a3ba82b8 Changed formating again. Added different levels. 2012-09-16 02:27:33 +02:00
Kristian S. Stangeland
adb57e2bf3 Fixed readme formating somewhat. 2012-09-16 02:22:34 +02:00
Kristian S. Stangeland
798d734ba9 Adding readme. 2012-09-16 02:17:38 +02:00
Kristian S. Stangeland
b299886b62 Fixed the old server listener. 2012-09-16 02:07:18 +02:00
Kristian S. Stangeland
913ff7eed1 Removed pointless imports. 2012-09-16 01:41:08 +02:00
Kristian S. Stangeland
d04a666bc5 Readded a lighter version of network object injector.
This version only supports CraftBukkit 1.3.0 and later.
2012-09-15 23:07:14 +02:00
Kristian S. Stangeland
bdfbfa47c8 The NetworkObjectInjector is too unstable, so we'll remove it. 2012-09-15 20:10:35 +02:00
Kristian S. Stangeland
57c720681a Made the object injector somewhat workable. 2012-09-15 20:09:34 +02:00
Kristian S. Stangeland
7e28aefb75 Moved the instance generator to a separate package.
In addition, added a new injection method. It's still not
finalized, and may get removed in the end.
2012-09-15 19:12:59 +02:00
Kristian S. Stangeland
aa2dcefa0d Added two different player injection hooks, for compatibility with
TagAPI.
2012-09-15 13:47:14 +02:00
Kristian S. Stangeland
616213924b Refactored the SortedCopyOnWriteArray out into a separate package.
Made it extend the java.util.Collection interface.
2012-09-15 13:07:44 +02:00
Kristian S. Stangeland
fffa3881dd We won't try to fix TagAPI. Instead, we'll warn the users. 2012-09-15 02:39:38 +02:00
Kristian S. Stangeland
85f7360109 Refactored the hacked array list out of the player injector. 2012-09-15 01:58:13 +02:00
Kristian S. Stangeland
f2effab907 Improved documentation in a few places. 2012-09-15 01:04:08 +02:00
Kristian S. Stangeland
4505e31965 Prevented concurrency issues.
The SortedCopyOnWriteArray didn't wrap the iterator() in a
unmodifiable iterator. In addition, ConcurrentListenerMultimap
incorrectly used the iterator to remove objects from this Array. 

Added a "remove(T value)" method that is thread-safe.
2012-09-14 22:33:15 +02:00
Kristian S. Stangeland
88dcf0cb32 Improved API and performance.
API changes:
 * The PacketListener now uses a "ListeningWhitelist" class 
   to report which packet ids it wishes to listen in on for
   either the client or the server. This makes it possible to 
   use your plugin class as the listener more easily.
   
 * Added a priority system similar to Bukkit events.
   
Performance changes:
 * Create and maintain a separate list of listeners for each packet
   ID. This uses slightly more memory, but is far more efficient. 
   Especially in light of the priority system.

In addition, the listener lists are (hopefully) concurrent. They're
optimized for read-access, however. Adding or removing a listener
is a O(n) operation.
2012-09-14 19:12:08 +02:00
Kristian S. Stangeland
bb8bec907c Added a priorty to every listener. Improved performance. 2012-09-14 12:41:57 +02:00
Kristian S. Stangeland
45169905fe Fix documentation. 2012-09-13 21:15:30 +02:00
Kristian S. Stangeland
783281ca2c Made "metrics" invisible. No point polluting the namespace. 2012-09-13 21:08:31 +02:00
Kristian S. Stangeland
0d35ab6038 Adding the license information. Using GPL2 as of now.
While libraries are sometimes licensed under LGPL, or even less
restrictive licenses, in this particular case it doesn't really
make sense to encourage direct copying. The problem is that 
competing libraries would conflict with each other. It's better
to feed improvements back into a single project.

Though, it's of course possible to fork this project. You can change
the internal classes - for instance, improving or changing the hook
points - without worriying about the public API.
2012-09-13 21:04:46 +02:00
Kristian S. Stangeland
8bb397b90e Adding the ItemDisguise example program. 2012-09-13 20:47:21 +02:00
Kristian S. Stangeland
0653dc8c15 Made the "getPlugin" method mandatory for all listeners.
It's pretty useful for the data collector, as well as the utility
method "removePacketListeners".
2012-09-13 17:29:37 +02:00
Kristian S. Stangeland
ed5ce19795 Added a plugin users report to metrics. 2012-09-13 17:06:48 +02:00
Kristian S. Stangeland
83f313ce89 Switching to Metrics full. 2012-09-13 16:46:11 +02:00
Kristian S. Stangeland
c02ffb569d Adding metrics (lite). 2012-09-13 16:08:55 +02:00
Kristian S. Stangeland
1710ef343b Syncronize before hacking into the packet list. In addition,
copy over any unprocessed packets into the new list.

When we're done, we'll also clean up properly by copying over 
any remaining packets.
2012-09-13 16:08:41 +02:00
Kristian S. Stangeland
5a6f3be219 Fix the server packet cancelling feature. 2012-09-13 14:56:14 +02:00
Kristian S. Stangeland
16d231f778 Fixed test case. 2012-09-13 14:43:15 +02:00
Kristian S. Stangeland
0d531ecc4b Added a custom exception. Simplified the event API. 2012-09-13 14:42:37 +02:00