13
0
geforkt von Mirrors/Velocity

Another misc cleanup for bossbars.

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-08-27 00:25:39 -04:00
Ursprung c2fa5d3ff1
Commit fead4783af

Datei anzeigen

@ -169,11 +169,11 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
player.getConnection().delayedWrite(new Respawn(joinGame.getDimension(), joinGame.getDifficulty(), joinGame.getGamemode(), joinGame.getLevelType())); 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) { for (UUID serverBossBar : serverBossBars) {
BossBar deletePacket = new BossBar(); BossBar deletePacket = new BossBar();
deletePacket.setUuid(serverBossBar); deletePacket.setUuid(serverBossBar);
deletePacket.setAction(1); // remove deletePacket.setAction(BossBar.REMOVE);
player.getConnection().delayedWrite(deletePacket); player.getConnection().delayedWrite(deletePacket);
} }
serverBossBars.clear(); serverBossBars.clear();