3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 16:12:42 +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) { private void sendPacket(UpdateAction action) {
ByteBuf buf = getPacket(action); for (UUID uuid : new ArrayList<>(players)) {
for (UUID uuid : new ArrayList<>(players)) ByteBuf buf = getPacket(action);
sendPacket(uuid, buf); sendPacket(uuid, buf);
}
} }
private void sendPacket(UUID uuid, ByteBuf buf) { private void sendPacket(UUID uuid, ByteBuf buf) {
if (!ViaVersion.getInstance().isPorted(uuid) || !(ViaVersion.getInstance().getPlayerVersion(uuid) >= ProtocolVersion.v1_9.getId())) { if (!ViaVersion.getInstance().isPorted(uuid) || !(ViaVersion.getInstance().getPlayerVersion(uuid) >= ProtocolVersion.v1_9.getId())) {
players.remove(uuid); players.remove(uuid);
buf.release();
return; return;
} }
ViaVersion.getInstance().sendRawPacket(uuid, buf); ViaVersion.getInstance().sendRawPacket(uuid, buf);