ᴍɪɴᴇᴄʀᴀꜰᴛʀᴇꜱᴏᴜʀᴄᴇꜱ

VPacketEvents

Modrinth

Manage packets through Velocity's native events

27.1K downloads31 followersUpdated 3mo ago

1.2.0 · MC 26.3 · Velocity

View on Modrinth

Files

  • 1.2.0

    release

    VPacketEvents 1.2.0

    26.326.226.1.226.1.1+80velocity

    2026-07-31 · 4.2K downloads

    VPacketEvents-1.2.0.jar · 14 KB

  • 1.1.0

    release

    VPacketEvents 1.1.0

    26.11.21.111.21.101.21.9+76velocity

    2023-04-20 · 22.1K downloads

    VPacketEvents-1.1.0.jar · 12 KB

    2 more files
    • vpacketevents-api-1.1.0-javadoc.jar

    • vpacketevents-api-1.1.0-sources.jar

  • 1.0.2

    release

    VPacketEvents 1.0.2

    1.19.41.19.31.19.21.19.1+56velocity

    2023-04-10 · 260 downloads

    VPacketEvents-1.0.2.jar · 8.7 KB

  • 1.0.1

    release

    VPacketEvents 1.0.1

    1.19.41.19.31.19.21.19.1+56velocity

    2023-02-28 · 328 downloads

    VPacketEvents-1.0.1.jar · 8.0 KB

  • 1.0.0

    release

    VPacketEvents 1.0.0

    1.19.31.19.21.19.11.19+55velocity

    2023-02-24 · 186 downloads

    VPacketEvents-1.0.0.jar · 8.0 KB

Files are delivered unmodified from Modrinth's servers and verified against the SHA-512 hash published by the project. The project's license applies to every file; check it before redistributing.

About

VPacketEvents

Discord GitHub Downloads

Manage and register packets through Velocity's native events

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
    }

    public void registerPacket() {
        // UpdateTeamsPacket registration
        PacketRegistration.of(UpdateTeamsPacket.class)
                .direction(Direction.CLIENTBOUND)
                .packetSupplier(UpdateTeamsPacket::new)
                .stateRegistry(StateRegistry.PLAY)
                .mapping(0x47, MINECRAFT_1_13, false)
                .mapping(0x4B, MINECRAFT_1_14, false)
                .mapping(0x4C, MINECRAFT_1_15, false)
                .mapping(0x55, MINECRAFT_1_17, false)
                .mapping(0x58, MINECRAFT_1_19_1, false)
                .mapping(0x56, MINECRAFT_1_19_3, false)
                .mapping(0x5A, MINECRAFT_1_19_4, false)
                .register();
    }
}

Installation

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

Dev Setup

Gradle

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

Javadocs

https://javadoc.io/doc/io.github.4drian3d/vpacketevents-api