13
0
geforkt von Mirrors/Velocity

Fix color and overlay packets for Adventure boss bar

Someone discovered this bug but decided not to tell anyone. For the record, I'm the one who was brain-damaged... well, I made that particular copy-paste error.
Dieser Commit ist enthalten in:
Andrew Steinborn 2021-04-15 04:22:44 -04:00
Ursprung 5ea6728d1a
Commit 4de71fe942

Datei anzeigen

@ -234,8 +234,9 @@ public class AdventureBossBarManager implements BossBar.Listener {
com.velocitypowered.proxy.protocol.packet.BossBar packet = new com.velocitypowered
.proxy.protocol.packet.BossBar();
packet.setUuid(this.id);
packet.setAction(com.velocitypowered.proxy.protocol.packet.BossBar.UPDATE_NAME);
packet.setAction(com.velocitypowered.proxy.protocol.packet.BossBar.UPDATE_STYLE);
packet.setColor(COLORS_TO_PROTOCOL.get(color));
packet.setOverlay(OVERLAY_TO_PROTOCOL.get(bar.overlay()));
packet.setFlags(serializeFlags(bar.flags()));
return packet;
}
@ -268,7 +269,8 @@ public class AdventureBossBarManager implements BossBar.Listener {
com.velocitypowered.proxy.protocol.packet.BossBar packet = new com.velocitypowered
.proxy.protocol.packet.BossBar();
packet.setUuid(this.id);
packet.setAction(com.velocitypowered.proxy.protocol.packet.BossBar.UPDATE_PROPERTIES);
packet.setAction(com.velocitypowered.proxy.protocol.packet.BossBar.UPDATE_STYLE);
packet.setColor(COLORS_TO_PROTOCOL.get(bar.color()));
packet.setOverlay(OVERLAY_TO_PROTOCOL.get(overlay));
return packet;
}