This Library / API is designed for simple and easy listening, cancelling and sending of packets.
Packet listening and cancelling can be done the same simple way as event listening and cancelling which is why this was made for.
PacketPacket contains custom packet classes with the same name as the original packet classes but with an extra "
P" in the beginning so the packet you're looking for shouldn't be hard to find.
For example, PacketPlayOutChat is
PPacketPlayOutChat, PacketPlayOutBlockChange is
PPacketPlayOutBlockChange and so on..
If you have any problems with
PacketPacket, please message me.
Make sure to not /reload every so often.
// Class must implement "dev.pixelmania.packetpacket.packet.PacketListener" as shown above. // priority and ignoreCancelled is optional for @ PacketHandler. // all the packet names are the same as Bukkit's but just add an extra "P" to the beginnning. // ( "PacketPlayInChat" - from Bukkit is "PPacketPlayInChat" - from PacketPacket )
// Registering packets is the same as if you were registering Bukkit events as shown above and below. // Bukkit.getPluginManager().registerEvents( new EventListenerClass(), this ); << Bukkit Event Registering // ; // PacketPacket.registerPackets( new PacketsListenerClass(), this); << Packets Registering // Very simple.
An example plugin using PacketPacket
If you like PacketPacket, then please consider leaving a review! If your plugin uses PacketPacket, message me and I will add it to the list below.
Plugins using this Library / API ;
- n/a
Make sure to add PacketPacket as depend in your plugin.yml!
You can use priority and ignoreCancelled when using @ PacketHandler above a method just like with an event's EventHandler.