Sueta

PacketInjectorAPI [1.8-1.21.3] - Manage packets easily

3.2.1

Simple API for managing packets. Powered by LightInjector!

·Plugin
  1. 3.2.1latestMinor improvementsOct 26, 2024
    · Updated LightInjector to 1.0.4 · Small fixes and improvements
    6 downloads
  2. 3.2.0Add 1.21.1 supportOct 6, 2024
    · Added support for Minecraft 1.21.1 · Updated LightInjector to 1.0.3
    16 downloads
  3. 3.1.2Add 1.20.2 supportSep 26, 2023
    Add support for 1.20.2 Updates LightInjector to 1.0.2 Now the packet logger will display the contents of bundle packets
    198 downloads
  4. 3.1.1Fix late injection on Paper server behind a BungeeCord instanceNov 23, 2022
    Updated LightInjector to 1.0.1. This fixes a bug which caused some packets to be lost on Paper servers behind a BungeeCord instance.
    249 downloads
  5. 3.1.0Use LightInjector to inject packetSep 18, 2022
    This release makes use of a brand new injector: LightInjector. This change will reduce the burden of maintaining and updating the API to new mc versions. The API itself has not changed, so updating to this version should be as easy as replacing the old jar with the new one. Note, however, that some login packets will not be intercepted anymore starting from this version (game packets are not affected). See the LightInjector javadoc for more information.
    103 downloads
  6. 3.0.2Add 1.19-1.19.2 supportAug 28, 2022
    Add support for 1.19-1.19.2
    65 downloads
  7. 3.0.1Perfect 1.18 supportDec 4, 2021
    · Perfect 1.18 support · Fix command filters not working properly
    452 downloads
  8. 3.0.0Complete rewriteNov 26, 2021
    The API has been completely rewritten. It is now more coincise and doesn't require fastutil. Also, it now uses an updated version of TinyProtocol to inject into minecraft and listen to packets. This means that now it is possible to listen to handshake, login, and status packets like PacketLoginInStart. This is how to create a PacketListener with the new API: Code (Java): PacketInjectorPlugin. getInstance ( ). getPacketInjectorAPI ( ). getEventManager ( ). registerPacketListener (plugin, new PacketListener ( ) { @Override public void onSend (PacketSendEvent event ) { // code } @Override public void onReceive (PacketReceiveEvent event ) { // code } } ) ; Please note that now event.getPlayer() can return null in case the player object is not available yet. For example, packet events fired when a player is joining but before PlayerJoinEvent does not provide a Player instance.
    105 downloads
  9. 2.0.0New APISep 8, 2020
    Added new API: Code (Java): PacketEventManager. registerPacketListener (pluginInstance, new PacketListener ( ) { @Override public void onSend (PacketSendEvent e ) { // TODO } @Override public void onRetrive (PacketRetriveEvent e ) { // TODO } } ) ; Old API is removed. Add the PacketInjectorAPI-Compatibility plugin to the plugins folder for old api compatibility.
    500 downloads
  10. 1.3.2Added support for 1.14 and 1.15Dec 20, 2019
    Due to a Spigot change, in 1.14.x and later versions you have to use these methods instead of the classic ones: Code (Java): PacketEventManager. registerSendListener (event -> { Object packet = event. getPacket ( ) ; // The old packet class must remain the same as the new one event. setPacket (newPacket ) ; Player player = event. getPlayer ( ) ; String packetName = event. getPacketName ( ) ; Object value = event. getValue ( "fieldName" ) ; event. setValue ( "fieldName", value ) ; event. setCancelled ( true ) ; } ) ; PacketEventManager. registerRetriveListener (event -> { Object packet = event. getPacket ( ) ; // The old packet class must remain the same as the new one event. setPacket (newPacket ) ; Player player = event. getPlayer ( ) ; String packetName = event. getPacketName ( ) ; Object value = event. getValue ( "fieldName" ) ; event. setValue ( "fieldName", value ) ; event. setCancelled ( true ) ; } ) ; If you are supporting versions before and after 1.14, you have to use both events (PacketSendEvent and PacketRetriveEvent) and PacketEventManager.
    494 downloads
  11. 1.3.1FixDec 17, 2019
    Sorry for this update, just a small fix
    112 downloads
  12. 1.3.0Added setPacket() MethodDec 17, 2019
    Added this methods: Code (Java): public void onPacketSend (PacketSendEvent event ) { // The old packet class must remain the same as the new one event. setPacket (newPacket ) ; } Code (Java): @EventHandler public void onPacketRetrive (PacketRetriveEvent event ) { // The old packet class must remain the same as the new one event. setPacket (newPacket ) ; }
    109 downloads
  13. 1.2.1Fixed BugDec 28, 2018
    Another update to try to fix completely the bug of the last update
    388 downloads
  14. 1.2.0Dec 28, 2018
    116 downloads
  15. 1.9Fixed an error during initializationNov 25, 2018
    Fixed an error that occours enabling the plugin
    153 downloads
  16. 1.8Fixed bug with sendPackets methodsSep 7, 2018
    Fixed bug with sendPacketToClient and sendPacketToServer methods
    140 downloads
  17. 1.7Added newInstance method to ReflectionUtil - Added metod to packet's eventsSep 7, 2018
    - Added method newInstance in the ReflectionUtil class to get a new Instance of a class using the proper constructor: Code (Java): public static Object newInstance (Class <?> clazz, Object... parameters ) ; - Added method to packet's events: Code (Java): public void setValue ( String field, Object value ) ; public Object getValue ( String field ) ; These methods can be optimized in future - Fixed some bugs
    115 downloads
  18. 1.6Send Packets to ServerAug 10, 2018
    With PacketInjectorAPI class you are enable to send packet not only to the client, but also to the server! Code (Java): public static void sendPacketToClient (Player player, Object packet ) public static void sendPacketToServer (Player player, Object packet )
    145 downloads
  19. 1.5Added getPacketName method to eventsAug 8, 2018
    Added getPacketName method to send and retrive events Code (Java): public String getPacketName ( ) ;
    138 downloads
  20. 1.41.13 updateJul 23, 2018
    Added 1.13 compatibility
    128 downloads
  21. 1.3Universal Events UpdateJul 2, 2018
    Now you can use PacketRetriveEvent and PacketSendEvent in all the version. Use PacketRetriveEvent_v1_7 and PacketSendEvent_v1_7 only if you want ChannelHandlerContext and ChannelPromise objects. In 1.8 and later version you can get ChannelHandlerContext and ChannelPromise objects with these events: PacketRetriveEvent_v1_8 PacketSendEvent_v1_8
    137 downloads
  22. 1.2MetricsJun 22, 2018
    Added Metrics using bStats
    141 downloads
  23. 1.1Bug fix - 1.7 support addedJun 21, 2018
    Fixed Bugs - 1.7 support added For 1.7 use these events: PacketSendEvent_v1_7 PacketRetriveEvent_v1_7
    155 downloads
  24. 1.0Jun 20, 2018
    146 downloads

Similar projects

Plugin →