Describe the bug
If you somehow managed to create a custom entity attribute, and try to log in on a server with packetevents installed, you will get an exception and will not be able to log in.
Software brand
Spigot 1.20.1
Plugins
PacketEvents, LibsDisguises
How To Reproduce
- Using cursed reflection code, add a custom entity attribute to all entities
- Launch the server
- Attempt to join
Expected behavior
The player should be able to join, the custom attribute should be ignored.
Screenshots

Additional context
After some digging, I figured out that this code literally allows null attribute values, causing the write method to throw an NPE, causing the whole disconnect. Adding a simple null check to the first link fixed the entire issue.
Describe the bug
If you somehow managed to create a custom entity attribute, and try to log in on a server with packetevents installed, you will get an exception and will not be able to log in.
Software brand
Spigot 1.20.1
Plugins
PacketEvents, LibsDisguises
How To Reproduce
Expected behavior
The player should be able to join, the custom attribute should be ignored.
Screenshots

Additional context
After some digging, I figured out that this code literally allows null attribute values, causing the write method to throw an NPE, causing the whole disconnect. Adding a simple null check to the first link fixed the entire issue.