With this script you can listen to, modify and cancel NMS ( net.minecraft.server) packets being sent / received.
Required addons:
- skript-reflect (2.1.0+)
Syntax
Packet event:
packet [<(.+)>]Within this event the event-values player and string are usable: player is the player that sent / received the packet, string is the simple name of the packet class.
The regex represents the simple name of the packet class, this class doesn't need to be imported. You can also not include this part, and the trigger will be called for every packet.
Packet:
[event-]packetExamples
on packet PacketPlayInChat:
send "&a%player% said %packet.a%" to console
cancel eventon packet PacketPlayInChat:
set packet.a to "Hello there!"Be aware that NMS packets aren't nice to deal with, as they're undocumented, obfuscated and inconsistent between Minecraft server versions. To know what fields you need, you'll have to look at the source code of your server. A resource that can help you a little is the Protocol page of wiki.vg, where the Minecraft protocol is documented. This page documents the packets and their usage, and documents the protocol fields. These protocol fields are different from the fields from nms packets, but they are often similar, so they can help you get started.
Similar projects
Script →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta