General - On Packet (Event) — PacketEventsSK

Addon: PacketEventsSK · Category: Event · Since: 1.0.0, 1.0.1 altered, 1.1.0 (changed from struct to event), 1.1.1 (added packet priority, added listening to all packets and fixed bugs)

Syntax

[on] ([any] packet|%*-packettype%) [(sync|async|netty) processed] [with packet[events] priority (lowest|low|normal|high|highest|monitor)]

Description

Listen to incoming/outgoing packets, more on [the wiki](https://github.com/3add/PacketEventsSK/wiki/Events)

Event Values

  • event-packet
  • event-player

Examples

on serverbound interact entity packet netty processed:
    cancel packet
# can be used to see which packets get sent in certain circumstances
on any packet:
    send packet type of event-packet to console

View source