fix tab list packet handling bug

This commit is contained in:
Bixilon 2021-11-03 18:47:55 +01:00
parent 2af86755e9
commit db88f83f72
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -165,16 +165,15 @@ class TabListDataS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket() {
item
} ?: continue
if (entity == null || entity !is PlayerEntity) {
continue
}
if (entity === connection.player) {
entity.tabListItem.specialMerge(data)
} else {
tabListItem.merge(data)
}
if (entity == null || entity !is PlayerEntity) {
continue
}
entity.tabListItem = tabListItem
}