Skip to content

Custom entity attributes prevent the player from logging in #1555

Description

@JustRed23

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

  1. Using cursed reflection code, add a custom entity attribute to all entities
  2. Launch the server
  3. Attempt to join

Expected behavior
The player should be able to join, the custom attribute should be ignored.

Screenshots
Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions