Do not reset when going from vanilla to vanilla

This commit is contained in:
Adrian Bergqvist 2023-06-12 20:13:13 +02:00
parent 07547130be
commit 7ab96fcbb4
No known key found for this signature in database
GPG Key ID: FAE7D8EDE225E686
3 changed files with 4 additions and 3 deletions

View File

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

View File

@ -39,7 +39,7 @@ import java.util.concurrent.TimeUnit;
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_19;
import static com.velocitypowered.proxy.protocol.packet.brigadier.ArgumentIdentifier.mapSet;
@Plugin(id = "ambassador", name = "Ambassador", version = "1.4.0-beta-rc8", authors = {"adde0109"})
@Plugin(id = "ambassador", name = "Ambassador", version = "1.4.0-beta-rc", authors = {"adde0109"})
public class Ambassador {
public ProxyServer server;

View File

@ -49,7 +49,8 @@ public class ForgeLoginSessionHandler implements MinecraftSessionHandler {
}
ConnectedPlayer player = serverConnection.getPlayer();
if (!(serverConnection.getConnection().getType() instanceof ForgeFMLConnectionType)) {
if (player.getConnection() == null || player.getConnection().getType() instanceof ForgeFMLConnectionType) {
if (player.getConnectedServer() == null ||
player.getConnectedServer().getConnection().getType() instanceof ForgeFMLConnectionType) {
//Initial Vanilla
//Forge -> vanilla
player.getPhase().resetConnectionPhase(player);