Unnecessary reset Vanilla <-> Vanilla

This commit is contained in:
Adrian Bergqvist 2023-04-06 15:33:50 +02:00
parent ebc80709b1
commit 3cc162a2a4
No known key found for this signature in database
GPG Key ID: 3B3DA43224B79417
3 changed files with 5 additions and 4 deletions

View File

@ -5,7 +5,7 @@ plugins {
}
group = "org.adde0109"
version = "1.3.1-beta"
version = "1.3.1-beta-rc3"
repositories {
mavenCentral()

View File

@ -40,7 +40,7 @@ import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_19;
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_19_3;
import static com.velocitypowered.proxy.protocol.packet.brigadier.ArgumentIdentifier.mapSet;
@Plugin(id = "ambassador", name = "Ambassador", version = "1.3.1-beta", authors = {"adde0109"})
@Plugin(id = "ambassador", name = "Ambassador", version = "1.3.1-beta-rc3", authors = {"adde0109"})
public class Ambassador {
public ProxyServer server;

View File

@ -49,9 +49,10 @@ public class ForgeLoginSessionHandler implements MinecraftSessionHandler {
}
ConnectedPlayer player = serverConnection.getPlayer();
if (!(serverConnection.getConnection().getType() instanceof ForgeFMLConnectionType) && player.getConnectedServer() != null) {
if (!(serverConnection.getConnection().getType() instanceof ForgeFMLConnectionType) && player.getConnectedServer() != null &&
player.getConnectedServer().getConnection().getType() instanceof ForgeFMLConnectionType) {
player.getPhase().resetConnectionPhase(player);
} else {
} else if (player.getConnectedServer() == null) {
MinecraftConnection connection = player.getConnection();
((OutboundSuccessHolder) connection.getChannel().pipeline().get(ForgeConstants.SERVER_SUCCESS_LISTENER))
.sendPacket();