Kristian S. Stangeland
801bf81f15
Incredibly difficult bug to track down.
...
Forgot to remove the "override" flag on cancelled packets when
they're sent again.
2012-09-30 03:24:13 +02:00
Kristian S. Stangeland
0cff9d1243
Ensure that asynchronous listeners are run, even if they have no
...
accompanying synchronous listener.
2012-09-30 00:51:59 +02:00
Kristian S. Stangeland
c77103246e
Small bug fixes.
2012-09-30 00:25:04 +02:00
Kristian S. Stangeland
711990fa15
Simplify the act of creating an asynchronous listener.
2012-09-30 00:13:36 +02:00
Kristian S. Stangeland
63197bbbd5
Add the other cases where we need to know if we're on the main thread
...
or not.
2012-09-29 23:52:28 +02:00
Kristian S. Stangeland
8a26d047b2
Client packets are processed on the server, so they must be
...
synchronized with the main thread.
2012-09-29 23:48:09 +02:00
Kristian S. Stangeland
d58ff1c4c1
Properly clean up after async listeners.
2012-09-29 23:21:09 +02:00
Kristian S. Stangeland
15b33925c0
Fixed a couple of minor bugs.
2012-09-29 22:25:09 +02:00
Kristian S. Stangeland
721d92bd4f
Fixed a minor bug.
2012-09-29 22:20:21 +02:00
Kristian S. Stangeland
b3098bc6ad
Pull up the important methods in the asynchronous packet handler.
2012-09-29 22:18:19 +02:00
Kristian S. Stangeland
e86c3d3a6e
We have to keep the setAsyncMarker method.
2012-09-29 22:12:30 +02:00
Kristian S. Stangeland
65b5a0e8ec
We don't expect consumers to create asynchronous markers, so
...
don't allow them to set it in the packet event.
2012-09-29 21:42:16 +02:00
Kristian S. Stangeland
a6db5419c0
Detect packet timeout.
2012-09-29 21:29:12 +02:00
Kristian S. Stangeland
4f4202185c
Make it even clearer that the listener loop method should be
...
called from a separate thread.
2012-09-29 21:18:21 +02:00
Kristian S. Stangeland
025e97ca95
Renamed the ListenerToken in the code as well.
2012-09-29 20:34:29 +02:00
Kristian S. Stangeland
880520cd94
Renamed the ListenerToken into a AsyncListenerHandler.
2012-09-29 20:32:18 +02:00
Kristian S. Stangeland
fad6a0a99c
Connect the asynchronous listeners to the system.
2012-09-29 20:30:22 +02:00
Kristian S. Stangeland
81321383d5
Renamed the async marker. Added handling of close.
2012-09-29 19:33:22 +02:00
Kristian S. Stangeland
285952b14d
Use the normal packet listener instead of an async listener.
2012-09-29 19:13:12 +02:00
Kristian S. Stangeland
6f02e79802
Still a work in progress.
...
I'm considering removing the async listener and use the packet listener
for both sync and async processing.
2012-09-29 18:05:08 +02:00
Kristian S. Stangeland
23e676533a
Beginning to add support for asynchronous packet listeners.
2012-09-29 01:00:12 +02:00
Kristian S. Stangeland
2012698275
Just in case, try to load the generated class first.
...
We might have generated it from a previous run.
2012-09-27 06:04:29 +02:00
Kristian S. Stangeland
42303ae0fc
Use the FieldAccessException instead of InvalidArgumentException.
...
Otherwise, the CompiledStructureModifier has a leaky abstraction.
2012-09-27 05:42:34 +02:00
Kristian S. Stangeland
0004fb530d
Update the package name in the compiler.
2012-09-27 05:28:52 +02:00
Kristian S. Stangeland
ea823e58f7
Move structure modifier compiler to the reflect package.
2012-09-27 05:28:13 +02:00
Kristian S. Stangeland
8293c71a4c
Make sure the packet IDs are actually valid.
2012-09-27 05:26:02 +02:00
Kristian S. Stangeland
eb8abd4635
Try to clean up after a failed hook.
2012-09-27 05:22:08 +02:00
Kristian S. Stangeland
240df9dc7a
Complicated feature - auto-compilation of structure modifier.
...
Using ASM we can automatically generate a faster structure modifier
that doesn't use reflection to read or write public fields.
Note that because the compilation itself is a bit slow (10 ms++),
we have to create a background compilation thread. Future work:
* Disable the thread if it's idle after 60 seconds.
* Don't recreate the thread when the server reloads.
2012-09-27 03:24:34 +02:00
Kristian S. Stangeland
90970d1b9b
Ensure that server operators are informed about incompatibility.
2012-09-26 06:00:26 +02:00
Kristian S. Stangeland
9efb85e7c3
Handle 1.3 correctly.
2012-09-26 04:06:10 +02:00
Kristian S. Stangeland
22f2f45d1e
Added support for a hook method that can intercept map chunk packets.
2012-09-26 03:31:59 +02:00
Kristian S. Stangeland
e04a78fc04
Added yet another player hook method.
...
This method works by injecting into the NetServerHandler object
of a player. That way, we can also intercept map chunk packets.
2012-09-26 02:26:44 +02:00
Kristian S. Stangeland
9e402a3ab4
Added a "canInject" property in the injectors.
2012-09-26 02:01:44 +02:00
Kristian S. Stangeland
d8b300e3a6
Try to get the local player object if possible.
2012-09-25 23:10:08 +02:00
Kristian S. Stangeland
e0c03186c3
Add support for Java serialization of PacketEvent. It might be useful.
2012-09-25 23:09:02 +02:00
Kristian S. Stangeland
7f69c0204d
Added a bit of commentary.
2012-09-25 17:13:23 +02:00
Kristian S. Stangeland
8839c03948
Fixed a number of simple bugs discovered by FindBugs.
2012-09-20 18:35:45 +02:00
Kristian S. Stangeland
3899704774
Merge pull request #1 from mbax/mbax
...
TagAPI is compatible as of version 1.7
2012-09-19 11:00:18 -07:00
mbax
9ad6dcb41c
TagAPI is compatible as of version 1.7
2012-09-19 13:47:38 -04:00
Kristian S. Stangeland
54242debaa
Made structure modifiers more overridable.
2012-09-19 19:25:11 +02:00
Kristian S. Stangeland
bc7b395889
Adding desperately needed async/sync documentation.
2012-09-19 03:48:46 +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
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