ProtocolLib 1.7.0

Details

  • Filename
    ProtocolLib-1.7.0.jar
  • Uploaded by
  • Uploaded
    Nov 20, 2012
  • Size
    644.00 KB
  • Downloads
    4,176
  • MD5
    565fd666196c6c46722bae4ef4725beb

Supported Bukkit Versions

  • CB 1.4.5-R0.2

Changelog

Another update is out. This time I've mainly focused on asynchronous listeners, along with the usual bug fixes. I've also fixed a serious bug that would prevent client packets from being re-transmitted after being cancelled, and this time (hopefully) the update feature should be working properly. Upgrading is recommended.

The most significant new feature is the ability to move processing of client packets to the main thread. This is important, as client packet are typically processed asynchronously in a client's reader thread, and as such cannot access the Bukkit API safely without manual synchronization. This is especially problematic if you need to cancel a packet as a response to the Bukkit API, such as the permission system.

Currently, you will have to either cancel the packet - which I'd discourage - and sync with the main thread and then re-transmit it outside the filters. Or you could use an asynchronous thread with callSyncMethod and wait on the returned future, but that involves a lot of complicated logic. A better method is needed.

Synchronous processing allows you to run light-weight packet listeners on the main thread without having to deal with synchronization, concurrency or the overhead of an additional thread. It can also process multiple packets per tick with a configurable timeout.

This, along with 7b9d971, makes it easy to delay light-weight packets to be synchronously processed. For an example of how to use this new feature, check out SynchronousCensor.

Features

Bug fixes

Small fixes

Documentation