Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-25 15:50:14 +01:00
Reset the scoreboard in the configuration stage
Dieser Commit ist enthalten in:
Ursprung
67a1805fa6
Commit
d61ad7baef
@ -81,7 +81,7 @@ public final class WorldCache {
|
||||
resetTitleTimes(false);
|
||||
}
|
||||
|
||||
public void removeScoreboard() {
|
||||
public void resetScoreboard() {
|
||||
scoreboard.removeScoreboard();
|
||||
scoreboard = new Scoreboard(session);
|
||||
}
|
||||
|
@ -45,5 +45,11 @@ public class JavaFinishConfigurationPacketTranslator extends PacketTranslator<Cl
|
||||
}
|
||||
session.sendUpstreamPacket(playerListPacket);
|
||||
session.getEntityCache().removeAllPlayerEntities();
|
||||
|
||||
// while ClientboundLoginPacket holds the level, it doesn't hold the scoreboard.
|
||||
// The ClientboundStartConfigurationPacket indirectly removes the old scoreboard,
|
||||
// and this packet indirectly creates the new one.
|
||||
// This makes this packet a good place to reset the scoreboard.
|
||||
session.getWorldCache().resetScoreboard();
|
||||
}
|
||||
}
|
||||
|
@ -71,8 +71,6 @@ public class JavaLoginTranslator extends PacketTranslator<ClientboundLoginPacket
|
||||
DimensionUtils.fastSwitchDimension(session, fakeDim);
|
||||
}
|
||||
|
||||
session.getWorldCache().removeScoreboard();
|
||||
|
||||
// Remove all bossbars
|
||||
session.getEntityCache().removeAllBossBars();
|
||||
// Remove extra hearts, hunger, etc.
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren