forked from GeyserMC/Geyser
Fix scoreboards bleeding into other servers (#902)
This commit is contained in:
parent
b0e291edc4
commit
66570a623d
1 changed files with 3 additions and 0 deletions
|
@ -31,6 +31,7 @@ import com.github.steveice10.mc.protocol.data.game.setting.SkinPart;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.ClientSettingsPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.ClientSettingsPacket;
|
||||||
import org.geysermc.connector.entity.PlayerEntity;
|
import org.geysermc.connector.entity.PlayerEntity;
|
||||||
import org.geysermc.connector.network.session.GeyserSession;
|
import org.geysermc.connector.network.session.GeyserSession;
|
||||||
|
import org.geysermc.connector.network.session.cache.ScoreboardCache;
|
||||||
import org.geysermc.connector.network.translators.PacketTranslator;
|
import org.geysermc.connector.network.translators.PacketTranslator;
|
||||||
import org.geysermc.connector.network.translators.Translator;
|
import org.geysermc.connector.network.translators.Translator;
|
||||||
import org.geysermc.connector.utils.DimensionUtils;
|
import org.geysermc.connector.utils.DimensionUtils;
|
||||||
|
@ -58,6 +59,8 @@ public class JavaJoinGameTranslator extends PacketTranslator<ServerJoinGamePacke
|
||||||
String fakeDim = entity.getDimension().equals(DimensionUtils.OVERWORLD) ? DimensionUtils.NETHER : DimensionUtils.OVERWORLD;
|
String fakeDim = entity.getDimension().equals(DimensionUtils.OVERWORLD) ? DimensionUtils.NETHER : DimensionUtils.OVERWORLD;
|
||||||
DimensionUtils.switchDimension(session, fakeDim);
|
DimensionUtils.switchDimension(session, fakeDim);
|
||||||
DimensionUtils.switchDimension(session, packet.getDimension());
|
DimensionUtils.switchDimension(session, packet.getDimension());
|
||||||
|
|
||||||
|
session.getScoreboardCache().removeScoreboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
AdventureSettingsPacket bedrockPacket = new AdventureSettingsPacket();
|
AdventureSettingsPacket bedrockPacket = new AdventureSettingsPacket();
|
||||||
|
|
Loading…
Reference in a new issue