Fix issue pointed out by Supereg; store dimension on first join too (#1979)

* Only double switch if the dimension is the same.

According to the protocol, a double respawn packet is only needed to be
sent if from the same dimension, so by storing the last known dimension,
we are able to compare and avoid the double packet.

This also maintains the same behaviour for Spigot
ad2f806097

* Store current dimension on first disconnect too
This commit is contained in:
Mystiflow 2016-10-29 22:28:11 +01:00 committed by md-5
parent 812141f400
commit 18f57f24fa

View File

@ -199,6 +199,8 @@ public class ServerConnector extends PacketHandler
DefinedPacket.writeString( bungee.getName() + " (" + bungee.getVersion() + ")", brand );
user.unsafe().sendPacket( new PluginMessage( "MC|Brand", DefinedPacket.toArray( brand ), handshakeHandler.isServerForge() ) );
brand.release();
user.setDimension( login.getDimension() );
} else
{
user.getServer().setObsolete( true );