Skip to content

v1.7

Compare
Choose a tag to compare
@retrooper retrooper released this 30 Oct 13:01
· 820 commits to master since this release
1d383a7

Changelog:

This changelog displays all changes since the last release(1.6.9).

These changes are listed from the oldest to the most recently added features/bug fixes.

I have not had the time to test every single feature, but I am very certain that a lot of things will work.
Make sure to report bugs as soon as you find them, so they can be fixed in a patch update.

All Changes Summarized:

• All deprecated methods since 1.6.9 have been cut off.
• The wrappers cache the fields efficiently for an even better performance experience. (Thanks to @terrarier2111)
• Usage of PacketEventsSettings changed.
Doing this is now possible:

PacketEvents.getSettings().injectAsync(true).ejectAsync(true).
useProtocolLibIfAvailable(true);

• Bug in WrappedPacketInWindowClick fixed.
• Cleaner errors, a few custom exceptions created(for example WrapperFieldNotFoundException) to help us spot bugs easier.
• WrappedPacketInArmAnimation removed as it was just a redundant wrapper, nothing to read.
• WrappedPacketOutGameStateChange "value" field accidentally returned the "reason" field.
• Finding entities by their ID optimized to use less reflection calls than necessary.
• WrappedPacketOutEntityMetadata created, for now only provides entity ID(so unfinished).
• WrappedPacketOutEntityTeleport wrapper created, performs best on 1.7-1.8.x.
Not recommended to use wrappers if it is possible with the Bukkit API as we will most likely be slower due to our reflection calls.
It is common that the required reflection calls of a field in a wrapper unfortunately increases every 3rd/4th minecraft update.
So wrappers perform best on 1.7.10 and 1.8.
• WrappedPacket now supports a nice util to write to fields.
Use this if a sendable wrapper you want to use does not exist yet.
• All wrappers optimized to only read the fields you access with its getter method.
For example, in the flying packet, if you only need access the xyz coordinates and nothing else, PacketEvents will not use reflection calls to redundantly read the other fields.
• Optimized ServerVersion enum, isHigherThan, isLowerThan.. with the ServerVersion have been optimized and are now not heavy at all, you no longer need to cache these things. (Thanks to @terrarier2111)
• Netty channel accessing (even when cached) optimized. (Thanks to @terrarier2111)
• Lots and lots of code cleanup. (Thanks to @terrarier2111)
• PacketEvents now calculates player ping independently with Keep Alive packets(we don't send any ourselves).
If you would still like to access NMS' calculated ping, now use:

PacketEvents.getAPI().getPlayerUtils().getNMSPing(Player);

The NMS ping is smoothed, so if you want a value close to NMS' calculations use:

PacketEvents.getAPI().getPlayerUtils().getSmoothedPing(Player);

• PostPacketReceiveEvent and PostPacketSendEvent created. (Not cancellable, they events assure you the relating event wasn't cancelled)
• Update checking uses the same thread pool that is used to inject players, eject players, and process events.
• WrappedPacketOutEntity can now be sent to players.
• BungeeCord support added(Check out the Bungee version)
• Vector3i utility class created
• PacketEvents auto resolve client version setting removed as it may cause falses and is now unneeded.
• PacketEvents now has a setting to use TinyProtocol and basically inject players earlier, so you won't need a dependency to resolve client versions.
• PacketLoginEvent created
• PacketStatusEvent created
• WrappedGameProfile utility class created
• Setting to inject earlier created(Basically if TinyProtocol should be used)
TinyProtocol allegedly has bugs when users join while the server is still starting, I will double check and test.
• New Setting to activate/deactivate TinyProtocol. If ViaVersion, ProtocolSupport or ProtocolLib is found, we will use their APIs to access their already resolved client version, so we don't have to. :)
This setting is enabled by default btw.

PacketEvents.getSettings().injectEarly(boolean);

• PacketType.Login.x and PacketType.Status.x Packet IDs created.
• All new login wrappers created:
WrappedPacketLoginDisconnect, WrappedPacketLoginHandshake, WrappedPacketLoginInCustomPayload(roughly since 1.13.2), WrappedPacketLoginInStart, WrappedPacketLoginOutEncryptionBegin, WrappedPacketLoginInEncryptionBegin, WrappedPacketLoginOutSetCompression(roughly since 1.8), WrappedPacketLoginOutSuccess
• All new status wrappers:
WrappedPacketStatusPing, WrappedPacketStatusPong
• The login and status event will only be triggered if you toggle on the early inject setting, as we need to inject early to listen to them.
• WrappedPacketOutExplosion created and can be sent to players.
• WrappedPacketOutEntityStatus created and can be sent to players.
• WrappedPacketOutExperience created and supports being sent to players.