DiamondPacketLib
Advanced Spigot Packet Library
DiamondPacketLib is a Spigot Packet Library optimzied for 1.8 - latest Minecraft Versions that made working with Packets as easy as using CraftBukkit Events
(The Code follows Google Checkstyle)
Features
You may know the CraftBukkit PlayerJoinEvent, it is just as easy to use the DiamondPacketReceiveEvent or the DiamondPacketSendEvent event, the first event is called as soon as the player sends a packet to the server and the other event as soon as the server sends a packet to the player. (Both can be canceled). The events pass you an object called Packet which is the packet the event catches through the ChannelDuplexHandler, additionally it passes you directly the player who sent it or should be sent to, just like you can cancel everything.
Example
Advanced Spigot Packet Library
DiamondPacketLib is a Spigot Packet Library optimzied for 1.8 - latest Minecraft Versions that made working with Packets as easy as using CraftBukkit Events
(The Code follows Google Checkstyle)
Features
- Simple Events
- Support for 1.8 - 1.17+ included
You may know the CraftBukkit PlayerJoinEvent, it is just as easy to use the DiamondPacketReceiveEvent or the DiamondPacketSendEvent event, the first event is called as soon as the player sends a packet to the server and the other event as soon as the server sends a packet to the player. (Both can be canceled). The events pass you an object called Packet which is the packet the event catches through the ChannelDuplexHandler, additionally it passes you directly the player who sent it or should be sent to, just like you can cancel everything.
Example
Code (Text):
@EventHandler
public void onReceive(DiamondPacketReceiveEvent event) {
final Player player = event.getPlayer();
if(event.getPacket().getClass().getSimpleName().equalsIgnoreCase("PacketPlayInEnchantItem")) {
event.setCancelled(true);
player.sendMessage("§cEnchanting Items is not cool!");
}
}
public void onReceive(DiamondPacketReceiveEvent event) {
final Player player = event.getPlayer();
if(event.getPacket().getClass().getSimpleName().equalsIgnoreCase("PacketPlayInEnchantItem")) {
event.setCancelled(true);
player.sendMessage("§cEnchanting Items is not cool!");
}
}
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.8, 1.9, 1.10
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
DiamondPacketLib is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11 and newer. Downloaded 61 times (via Spigot). Download it and open it directly in the game.