mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-03 15:33:48 +01:00
Don't send a meta data packet when list is empty. #288
This commit is contained in:
parent
5c84b3d8cc
commit
3602c5087b
@ -201,6 +201,16 @@ public class EntityPackets {
|
||||
tracker.handleMetadata(entityID, metadataList);
|
||||
}
|
||||
});
|
||||
|
||||
// Cancel packet if list empty
|
||||
handler(new PacketHandler() {
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
List<Metadata> metadataList = wrapper.get(Protocol1_9TO1_8.METADATA_LIST, 0);
|
||||
if(metadataList.size() == 0)
|
||||
wrapper.cancel();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user