From 36c7d7c9d7e602a7c6bd75c917fe28c8d11b9441 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 25 Sep 2022 12:46:40 +0200 Subject: [PATCH] Remove Testing Code --- .../chaoscaot/altauth/fabric/mixin/LoginRequestMixin.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fabric/src/de/chaoscaot/altauth/fabric/mixin/LoginRequestMixin.java b/fabric/src/de/chaoscaot/altauth/fabric/mixin/LoginRequestMixin.java index 02dacae..8663a5e 100644 --- a/fabric/src/de/chaoscaot/altauth/fabric/mixin/LoginRequestMixin.java +++ b/fabric/src/de/chaoscaot/altauth/fabric/mixin/LoginRequestMixin.java @@ -34,9 +34,9 @@ public class LoginRequestMixin { @Inject(at = @At("HEAD"), method = "onHello", cancellable = true) public void onHello(LoginHelloS2CPacket packet, CallbackInfo ci) { - String server = "chaoscaot.de";//packet.getServerId(); + String server = packet.getServerId(); try { - //if(packet.getServerId().contains(".")) { + if(packet.getServerId().contains(".")) { LOGGER.info("AltauthClient: LoginRequestMixin: Server is running on a custom: {}", server); if(ClientConfig.INSTANCE.allowedServers.contains(server)) { if(MinecraftClient.getInstance().currentScreen instanceof ConnectScreen cs) { @@ -64,11 +64,11 @@ public class LoginRequestMixin { }, Text.translatable("gui.altauth.confirm.title", AltAuth.address.getAddress(), server), Text.translatable("gui.altauth.confirm.text", server), ScreenTexts.YES, ScreenTexts.CANCEL))); } } - /*} else { + } else { LOGGER.info("AltauthClient: LoginRequestMixin: Server is running on mojang"); URL url = new URL(YggdrasilEnvironment.PROD.getEnvironment().getSessionHost() + "/session/minecraft/join"); Reflect.on(MinecraftClient.getInstance().getSessionService()).set("joinUrl", url); - }*/ + } } catch (Exception e) { e.printStackTrace(); if(MinecraftClient.getInstance().currentScreen instanceof ConnectScreen cs) {