packetevents

PacketEvents is emerging as a strong contender in the realm of Minecraft packet processing libraries. Designed to simplify packet manipulation while delivering high performance, this powerful tool aims to demystify the complexities of projects utilizing packets.

GPL-3.0 License

Stars
515
Committers
88

Bot releases are visible (Hide)

packetevents - v1.5.6 Release

Published by retrooper about 4 years ago

Changelog since 1.5.5

  • WrappedPacketInEntityAction bug fix for 1.7.10
  • All deprecated methods in the ServerUtils & PacketEventsAPI class removed
packetevents - v1.5.5

Published by retrooper about 4 years ago

Changelog since 1.5.4.2

  • License updated to MIT
  • Packet name is only accessed, if you call the getPacketName() method, it is recommended to compare packets with IDs
  • HeldItemSlot wrapper added
  • CustomPayload wrapper added
  • ArmAnimation wrapper added

Special thank you to our contributors for helping me maintain this API.

packetevents - v1.5.4.2

Published by retrooper about 4 years ago

Changelog since 1.5.4.1

  • Player quit error fixed
packetevents - v1.5.4.1

Published by retrooper about 4 years ago

Changelog since 1.5.4(.0)

  • PlayerUninjectEvent#isSync now documented
  • Shutdown bugs fixed(unending shutdown)
  • Code cleanup & Imports optimized
packetevents - v1.5.4

Published by retrooper over 4 years ago

Changelog:

• Shutdown errors, caused by pending reloads FIXED
• Auto resolve client version setting added, it will set the client version to the server's version if the client version fails to resolve
• toProtocolVersion() added in ServerVersion

MAKE SURE YOU DON'T START AND STOP packetevents if you are using the JAR version of the API as it is already done for you.

Will cause errors.

packetevents - v1.5.3 Stable release

Published by retrooper over 4 years ago

Changelog since 1.4.2

  • All reload issues fixed
  • Multiple plugins using the API can now run safely
  • An Identifier must be specified in the settings
    PacketEvents.getSettings().setIdentifier(“my-anticheat-name”);
    The identifier MUST be set before the PacketEvents.start(this) is called!
    This identifier is used to have unique handler names, another plugin having the same identifier will cause errors.
    So, keep it unique!
  • WrappedPacketOutKeepAlive wrapper added
  • PlayerUninjectEvent#isSync added, basically telling you if the uninjection has been called asynchronously or synchronously.
    The event is still called synchronously!
    Players are only uninjected synchronously when the server stops/reloads.
    Meaning the event is called asynchronously when they manually leave the server or have been kicked.
  • PacketEvents.getAPI().getPlayerUtilities() deprecated, use getPlayerUtils()
  • PacketEvents.getAPI().getServerUtilities() deprecated, please use getServerUtils()
  • PacketEvents.getAPI().getPlayerUtils().uninjectPlayerNow(Player) added, calling that method will synchronously uninject the player.
packetevents - v1.5 Pre

Published by retrooper over 4 years ago

AS THIS IS A PRE RELEASE, IT IS RECOMMENDED NOT TO BE USED

  • ServerTickEvent removed
  • Method renames in the utilities and old method names deprecated
  • Massive API changes, an instance of PacketEvents must be created now
  • Multiple PacketEvents instances may run now
  • packet ids now use bytes instead of ints
packetevents - v1.4.2

Published by retrooper over 4 years ago

Changelog:

  • PacketEvents.getAPI().getPlayerUtilities().getPlayerPing(player); deprecated, use getPing(player);

  • ServerTickEvent deprecated and it's Bukkit task too, will be removed in the next VersionLookupUtils

  • PacketEvents.getAPI().getSettings().setDefaultServerVersion(version); added
    Settings the default version will let PacketEvents use the default version if PacketEvents fails to detect your server version.
    No idea why this happens in a spigot fork by the name of mSpigot, but yea.

packetevents - v1.4.1

Published by retrooper over 4 years ago

Changelog:

  • WrappedPacketOutEntity added, which can be used for Rel entity move and rel entity movelook and entity look aswell!

  • Now possible to register/unregister multiple listeners in one method call.

PacketEvents.getAPI().getEventManager().registerListeners(LISTENER, LISTENER2);

PacketEvents.getAPI().getEventManager().unregisterListeners(LISTENER, LISTENER2);

packetevents - v1.4

Published by retrooper over 4 years ago

CREDIT TO TRG for helping out
• Packets are now compared with integer IDs.
• PacketSendEvent#getPacketId() added.
• PacketTypeNames deprecated, will be removed in the next version.
• All 1.16 Packets added

packetevents - v1.3.9

Published by retrooper over 4 years ago

Note: ONLY TESTED ON 1.8

  • PacketReceiveEvent#getPacketId() added
    *PacketType comparing packets should no longer be done with strings, instead with int IDs
    Example:
if(PacketReceiveEvent#getPacketId() == PacketType.Client.ARM_ANIMATION)
  • Comparing with int ids only finished for client side (serverbound) packets, server side support coming soon
  • PacketEvents should be it is started.
    It is recommended to load it in the onLoad() function in your main class, ONLY load if you are not using the packetevents jar.

How to load packetevents

PacketEvents.load()

How to start packetevents

PacketEvents.start(plugin);
packetevents - v1.3.8

Published by retrooper over 4 years ago

  • PacketTypeClasses class added for NMS Packet class comparisons
  • @PacketHandler(synchronization = EventSynchronization.x) added
packetevents - v1.3.7.2

Published by retrooper over 4 years ago

Changelog:

  • Fixed all issues with the entity-action wrapper
packetevents - v1.3.7

Published by retrooper over 4 years ago

PacketEvents 1.3.7

• Most clientbound wrappers tested, it is assumed the rest will work
• Official 1.16.1 Support
• All bugs from 1.3.6.2 fixed
• Wrote a custom Reflection utils, much cleaner code now with auto caching

packetevents - v1.3.6.3

Published by retrooper over 4 years ago

Changelog:

  • Bug fix, accidentally swapped read and write.
packetevents - v1.3.6.2

Published by retrooper over 4 years ago

All issues fixed with netty listener. Apologize for all these bugs.

packetevents - v1.3.6

Published by retrooper over 4 years ago

Changelog:

  • Forgot to uninject when the player leaves
packetevents - v1.3.5.2

Published by retrooper over 4 years ago

Changelog:

  • Issue with position or position look or look packet loading too late, causing them to be null.
packetevents - v1.3.5.1

Published by retrooper over 4 years ago

Changelog:

  • ViaVersion & ProtocolSupport are now marked as provided so they aren't packed inside your plugin!
packetevents - v1.3.5

Published by retrooper over 4 years ago

1.3.5 RELEASE

This is the most stable version of PacketEvents I have ever released.
I recommend all of you update to this version!

Changelog:

  • TinyProtocol removed

  • API Size way smaller

  • PlayerUninjectEvent is now called

  • Version lookup methods re-added, but version lookup is only possible with ProtocolSupport or ViaVersion plugin avaialable on the server.
    If you try looking up version and none of the listed plugins could be found, you will result with ClientVersion.ACCESS_FAILURE

  • WrappedPacketOutAbilities sendable wrapper added

  • PostPlayerInjectEvent has been deprecated, please use PlayerInjectEvent

  • PlayerUninjectEvent now cancellable

  • PlayerInjectEvent or PlayerUninjectEvent cancelling, will cancel the action.

  • pom.xml version updated to 1.3.5

  • Packet class has been deprecated, please use PacketType instead!

  • Packet.isInstanceOfFlyingPacket(nmsPacket) -> PacketType.Util.isInstanceOfFlyingPacket(nmsPacket), and more instanceof functions are added in the PacketType.Util class too!

  • PacketReceiveEvent#getPacket() is deprecated, please use PacketReceiveEvent#getNMSPacket()

  • PacketSendEvent#getPacket() is deprecated, please use PacketSendEvent#getNMSPacket()

  • PacketEvents.setShouldKickOnRestart(boolean) removed

Related Projects