From 3409fe6dd3bd0d19943de4e0ff12b6a8a583a87b Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 25 Jun 2020 15:25:15 +1000 Subject: [PATCH] Clear scoreboards and bossbars on new style server switch --- proxy/src/main/java/net/md_5/bungee/ServerConnector.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java index 52e9e7c5..e1915a66 100644 --- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java +++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java @@ -220,6 +220,10 @@ public class ServerConnector extends PacketHandler if ( user.getServer() != null ) { user.getServer().setObsolete( true ); + + user.getServerSentScoreboard().clear(); + user.getSentBossBars().clear(); + user.unsafe().sendPacket( new Respawn( login.getDimension(), login.getWorldName(), login.getSeed(), login.getDifficulty(), login.getGameMode(), login.getPreviousGameMode(), login.getLevelType(), login.isDebug(), login.isFlat(), false ) ); user.getServer().disconnect( "Quitting" ); } else