From fead4783af44f0b6dd55fe5a2266b93d3b106b24 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Mon, 27 Aug 2018 00:25:39 -0400 Subject: [PATCH] Another misc cleanup for bossbars. --- .../proxy/connection/client/ClientPlaySessionHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java index 1e011e5e8..82a4e0384 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java @@ -169,11 +169,11 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler { player.getConnection().delayedWrite(new Respawn(joinGame.getDimension(), joinGame.getDifficulty(), joinGame.getGamemode(), joinGame.getLevelType())); } - // Remove old boss bars. + // Remove old boss bars. These don't get cleared when sending JoinGame so we need to track these. for (UUID serverBossBar : serverBossBars) { BossBar deletePacket = new BossBar(); deletePacket.setUuid(serverBossBar); - deletePacket.setAction(1); // remove + deletePacket.setAction(BossBar.REMOVE); player.getConnection().delayedWrite(deletePacket); } serverBossBars.clear();