Plugin Release VPacketEvents | Manage packets through Velocity's native events

Download Link
https://modrinth.com/plugin/vpacketevents
Source Code
https://github.com/4drian3d/VPacketEvents
Documentation
https://github.com/4drian3d/VPacketEvents
Support
https://discord.gg/5NMMzK5mAn
Minecraft Versions
Velocity 3.2.0+
Compatible Java Versions
Java 11+
VPacketEvents

Manage packets through Velocity's native events

Java:
class PacketListener {
    @Subscribe
    public void onPacketReceive(PacketReceiveEvent event) {
        final MinecraftPacket packet = event.getPacket();
        if (packet instanceof KeyedPlayerCommand commandPacket) {
           event.setResult(GenericResult.denied());
        }
    } 
    
    @Subscribe
    public void onPacketSend(PacketSendEvent event) {
        // some stuff
    }
}


Installation
  • Download VPacketEvents from Modrinth
  • Drag and drop on your plugins folder
  • Start the server


Dev Setup

Gradle

Code:
repositories {
    mavenCentral()
}
dependencies {
    compileOnly("io.github.4drian3d:vpacketevents-api:1.0.0")
}

Javadocs