Execute onPacketSending() on the main thread for monitor listeners.A special-case occurs when a plugin sends a packet to a client
with filters set to FALSE (that is, bypassing most packet listeners) -
a new packet event is constructed solely for all MONITOR listeners, as
they are informed regardless of the value of FILTER.
Unfortunately, the sending method may be invoked on a thread other
than the main thread, which will invoke onPacketSending()
asynchron...
Warn plugins that never call start/syncStart on AsyncListenerHandler.This is almost always incorrect as it will simply block the
transmission or reception of every packet of a given type.
Allow any string in WrappedGameProfile(String, String).We now accept any string in this constructor, to preserve
backwards compatibility. But, we depreciate its use, as
WrappedGameProfile(UUID, String) can be used in every Minecraft
version that supports a game profile.
There's also a new warning system that will identify the plugin
that is using the depreciated method, and print its name to the
console (at most once every hour).
May solve a race condition in ticket 220 on BukkitDev.It is possible, though not confirmed, that ProtocolLib has not been
fully cleaned up after a "reload" command and the next instance of
ProtocolLib is loaded. In that case, it may be possible that a channel
is injected in the main thread while its cleanup procedure is still
running.
This is an attempt to solve this problem. Though, it is not confirmed
to work.
Fix a bug preventing ClassSource.retry() from working correctly.We returned the class of the other ClassSource, instead of invoking
its loadClass() method.
Added the ability to toggle whether or not a given player is injected.We also ensure we can run multiple instances of TinyProtocol without
requiring implementers to override getHandlerName().
Also fixed a potential memory leak, as the channel map was set to
weakKeys() instead of the correct weakValues().
Update sample code in readmeThe current sample code uses the magic packet IDs, which are deprecated in the current version of the library. This commit changes the sample code to use the non-deprecated enum-like packet identifiers, the sample code which is present on the BukkitDev page for this plugin (with some minor tweaks).
Throw ClassNotFoundException when appropriateCurrently, the ClassSource returned by ClassSource.fromMap will return null if the Class cannot be found (as that is the behavior of maps). However, other ClassSources throw a ClassNotFoundException if the class cannot be loaded. This commit changes the behavior of ClassSource.fromMap to throw a ClassNotFoundException if the class was not found in the map (or was mapped to null). This commit al...
Correct a bug that would lead to IllegalStateException in plugins.This was caused by the fact that "requireInputBuffer" used
findLegacy(int) to get the correct PacketType, instead of
findLegacy(int, Sender.CLIENT). The latter is justified by the fact
that only client-side packets require an input buffer.
Update MinecraftReflection exception messagesThe messages incorrectly identified the minecraft server package as "net.mineraft.server"
This commit fixes that
Although it is only a minor spelling error, it is worth fixing
Add the "compare" flag to the "packet add" command.This instructs ProtocolLib to fetch the original state of the packet,
before its processed by any packet listeners above LOWEST. Then,
it displays this state in the console, along with the final state as
retrieved in MONITOR.
Added support for "post packet events".NetworkMarker now contains a list of post listeners that are invoked
(in no particular order) when a packet has been serialize and sent
to a player, OR, when it has been enqueued for processing by the
server.
This works for both 1.7.2+ (Netty) and 1.6.4 and earlier, though the
1.6.4 version has a good deal more overhead.
Better to fail updating the version number than crashing.If we update the number, we have to also use the "empty file" trick
to remove the old file, which will crash ProtocolLib on the first
reload. It takes a second reload for it to function at all.
It's much better to take the hit on the version number, and avoid
this issue altogether. The update method simply wasn't designed for
plugins with version numbers in their file name.