diff --git a/src/main/java/de/zonlykroks/advancedscripts/AdvancedScripts.java b/src/main/java/de/zonlykroks/advancedscripts/AdvancedScripts.java index 3309abf..2cb35eb 100644 --- a/src/main/java/de/zonlykroks/advancedscripts/AdvancedScripts.java +++ b/src/main/java/de/zonlykroks/advancedscripts/AdvancedScripts.java @@ -19,8 +19,6 @@ package de.zonlykroks.advancedscripts; import net.fabricmc.api.ClientModInitializer; public class AdvancedScripts implements ClientModInitializer { - - public static boolean isOnSteamwar = false; @Override public void onInitializeClient() { diff --git a/src/main/java/de/zonlykroks/advancedscripts/mixin/ConnectScreenMixin.java b/src/main/java/de/zonlykroks/advancedscripts/mixin/ConnectScreenMixin.java deleted file mode 100644 index e890bd0..0000000 --- a/src/main/java/de/zonlykroks/advancedscripts/mixin/ConnectScreenMixin.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 SteamWar.de-Serverteam - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -*/ - -package de.zonlykroks.advancedscripts.mixin; - -import de.zonlykroks.advancedscripts.AdvancedScripts; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.gui.screen.ConnectScreen; -import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.network.ClientPlayNetworkHandler; -import net.minecraft.client.network.ServerAddress; -import net.minecraft.client.network.ServerInfo; -import net.minecraft.network.packet.s2c.play.GameJoinS2CPacket; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(ConnectScreen.class) -public class ConnectScreenMixin { - - @Inject(method = "connect(Lnet/minecraft/client/gui/screen/Screen;Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/client/network/ServerAddress;Lnet/minecraft/client/network/ServerInfo;)V", at = @At("TAIL")) - private static void isOnSteamwar(Screen screen, MinecraftClient client, ServerAddress address, ServerInfo info, CallbackInfo ci) { - String adress = address.getAddress(); - - AdvancedScripts.isOnSteamwar = adress == "steamwar.de" || adress == "78.31.71.136"; - } - -} diff --git a/src/main/resources/advancedscripts.mixins.json b/src/main/resources/advancedscripts.mixins.json index 92d0313..a4b8220 100644 --- a/src/main/resources/advancedscripts.mixins.json +++ b/src/main/resources/advancedscripts.mixins.json @@ -6,7 +6,6 @@ "mixins": [ ], "client": [ - "ConnectScreenMixin", "KeyboardMixin" ], "injectors": {