Skip to content

Player#sendEquipmentChange produces invalid packet with empty map (causes disconnect) #12005

@NonSwag

Description

@NonSwag

Expected behavior

Method call should silently fail

Observed/Actual behavior

ClientboundSetEquipmentPacket is sent anyway

Steps/models to reproduce

invoke Player#sendEquipmentChange with an empty map as slots argument

Plugin and Datapack List

irrelevant

Paper version

[21:30:36 INFO]: Checking version, please wait...
[21:30:36 INFO]: This server is running Paper version 1.21.4-121-main@88bbead (2025-01-22T20:05:15Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-118-73f7736 (MC: 1.21.4)

Other

ClientboundSetEquipmentPacket does not allow for empty slots

io.netty.handler.codec.DecoderException: Failed to decode packet 'clientbound/minecraft:set_equipment'

Caused by: java.lang.IndexOutOfBoundsException: readerIndex(2) + length(1) exceeds writerIndex(2): PooledUnsafeDirectByteBuf(ridx: 2, widx: 2, cap: 2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: apistatus: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.version: 1.21.4Game version 1.21.4

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions