3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

Don't send a meta data packet when list is empty. #288

Dieser Commit ist enthalten in:
Myles 2016-04-01 18:13:23 +01:00
Ursprung 5c84b3d8cc
Commit 3602c5087b

Datei anzeigen

@ -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();
}
});
}
});