Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
VPacketEvents

VPacketEvents

Manage packets through Velocity's native events

10.4k
28
Library
Technology
AboutChangelogVersions

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

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Compatibility

Minecraft: Java Edition

1.21.x
1.20.x
1.19.x
1.18.x
1.17.x
1.16.x
1.15.x
1.14.x
1.13.x
1.12.x
1.11.x
1.10.x
1.9.x
1.8.x
1.7.x

Platforms

Velocity

Supported environments

Server-side

Links

Report issues View source Visit wiki Join Discord server
Donate on PayPalBuy Me a CoffeeSponsor on GitHub

Creators

4drian3d
4drian3d Owner

Details

Licensed GPL-3.0-or-later
Published 2 years ago
Updated 2 years ago

Modrinth is open source.

main@fafd47f

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.