Skip to content

Commit 9826729

Browse files
committed
improve welcome
1 parent 2b9d825 commit 9826729

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/java/cn/ussshenzhou/channel/gui/LoginNotificationHelper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package cn.ussshenzhou.channel.gui;
22

33
import cn.ussshenzhou.channel.input.ModKeyMappingRegistry;
4+
import cn.ussshenzhou.channel.util.CompatHelper;
45
import cn.ussshenzhou.t88.gui.notification.TSimpleNotification;
56
import net.minecraft.network.chat.Component;
67
import net.neoforged.api.distmarker.Dist;
@@ -16,6 +17,9 @@ public class LoginNotificationHelper {
1617

1718
@SubscribeEvent
1819
public static void showNotification(ClientPlayerNetworkEvent.LoggingIn event) {
20+
if (!CompatHelper.isClientLevelValid()) {
21+
return;
22+
}
1923
TSimpleNotification.fire(
2024
Component.translatable("channel.welcome",
2125
ModKeyMappingRegistry.CONFIG.getKeyModifier().getCombinedName(ModKeyMappingRegistry.CONFIG.getKey(), () -> ModKeyMappingRegistry.CONFIG.getKey().getDisplayName()).getString(),

0 commit comments

Comments
 (0)