Skip to content

Check for empty when sending equipment changes#12008

Merged
lynxplay merged 1 commit into
PaperMC:mainfrom
HaHaWTH:fix/send-equipment-change
Jan 25, 2025
Merged

Check for empty when sending equipment changes#12008
lynxplay merged 1 commit into
PaperMC:mainfrom
HaHaWTH:fix/send-equipment-change

Conversation

@HaHaWTH
Copy link
Copy Markdown
Contributor

@HaHaWTH HaHaWTH commented Jan 25, 2025

Closes #12005.

Add checks for empty in CraftPlayer#sendEquipmentChange, will give a clear error for what's going on instead of directly disconnect the player.
Add notes in Player#sendEquipmentChange(LivingEntity, Map<EquipmentSlot,ItemStack>) javadoc.

@HaHaWTH HaHaWTH requested a review from a team as a code owner January 25, 2025 18:33
@Warriorrrr Warriorrrr added type: bug Something doesn't work as it was intended to. scope: api labels Jan 25, 2025
@lynxplay lynxplay merged commit 336ea9d into PaperMC:main Jan 25, 2025
@HaHaWTH HaHaWTH deleted the fix/send-equipment-change branch January 4, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: api type: bug Something doesn't work as it was intended to.

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

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

4 participants