From c07a15967bdc72886140176b6ed851febe0d1fe8 Mon Sep 17 00:00:00 2001 From: Emma Alexia Date: Thu, 4 Jul 2024 12:01:30 -0400 Subject: [PATCH] Apply suggestions from code review --- .../java/coffee/waffle/emcutils/Util.java | 4 ++- .../resources/emcutils-common.mixins.json | 26 +++++++++---------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/common/src/main/java/coffee/waffle/emcutils/Util.java b/common/src/main/java/coffee/waffle/emcutils/Util.java index 15e179d..b53cadf 100644 --- a/common/src/main/java/coffee/waffle/emcutils/Util.java +++ b/common/src/main/java/coffee/waffle/emcutils/Util.java @@ -37,7 +37,9 @@ public static boolean isOnEMC() { return false; } - return networkHandler.getConnection().getAddressAsString(true).contains("emc.gs"); + String address = networkHandler.getConnection().getAddressAsString(true); + + return address.contains("emc.gs") || address.contains("empire.us") || address.contains("empireminecraft.com"); } public static void setCurrentServer(String name) { diff --git a/common/src/main/resources/emcutils-common.mixins.json b/common/src/main/resources/emcutils-common.mixins.json index 387e969..cdb1d78 100644 --- a/common/src/main/resources/emcutils-common.mixins.json +++ b/common/src/main/resources/emcutils-common.mixins.json @@ -1,16 +1,16 @@ { - "required": true, - "minVersion": "0.8", - "package": "coffee.waffle.emcutils.mixin", - "compatibilityLevel": "JAVA_21", - "client": [ - "ChatScreenMixin", - "ClientPlayNetworkHandlerMixin", - "IdentifierMixin", - "PlayerEntityMixin", - "PlayerListHudMixin" - ], - "injectors": { - "defaultRequire": 1 + "required": true, + "minVersion": "0.8", + "package": "coffee.waffle.emcutils.mixin", + "compatibilityLevel": "JAVA_21", + "client": [ + "ChatScreenMixin", + "ClientPlayNetworkHandlerMixin", + "IdentifierMixin", + "PlayerEntityMixin", + "PlayerListHudMixin" + ], + "injectors": { + "defaultRequire": 1 } }