3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 00:00:28 +01:00

Fix bossbars so they send correctly, credits to @jollyolbrits for detailed reporting of where the issue may take place.

Dieser Commit ist enthalten in:
Myles 2016-04-19 22:53:27 +01:00
Ursprung a496b2d3a8
Commit 0ae9d9dbbf

Datei anzeigen

@ -153,14 +153,16 @@ public class ViaBossBar implements BossBar {
}
private void sendPacket(UpdateAction action) {
for (UUID uuid : new ArrayList<>(players)) {
ByteBuf buf = getPacket(action);
for (UUID uuid : new ArrayList<>(players))
sendPacket(uuid, buf);
}
}
private void sendPacket(UUID uuid, ByteBuf buf) {
if (!ViaVersion.getInstance().isPorted(uuid) || !(ViaVersion.getInstance().getPlayerVersion(uuid) >= ProtocolVersion.v1_9.getId())) {
players.remove(uuid);
buf.release();
return;
}
ViaVersion.getInstance().sendRawPacket(uuid, buf);