From 4de71fe9426038ca7d0570c5968157c3a7a9cbad Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Thu, 15 Apr 2021 04:22:44 -0400 Subject: [PATCH] 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. --- .../proxy/util/bossbar/AdventureBossBarManager.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/util/bossbar/AdventureBossBarManager.java b/proxy/src/main/java/com/velocitypowered/proxy/util/bossbar/AdventureBossBarManager.java index 3ff17998d..3136169dd 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/util/bossbar/AdventureBossBarManager.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/util/bossbar/AdventureBossBarManager.java @@ -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; }