From ccc9bd1c508c6d1609468e3bce751ee1e1d18b37 Mon Sep 17 00:00:00 2001 From: bazke Date: Mon, 30 Oct 2023 21:51:36 +0100 Subject: [PATCH] subscribe on client only --- .../extras/client/command/RenderPlayerNameTagCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/lovetropics/extras/client/command/RenderPlayerNameTagCommand.java b/src/main/java/com/lovetropics/extras/client/command/RenderPlayerNameTagCommand.java index 14aa819d..b4063db1 100644 --- a/src/main/java/com/lovetropics/extras/client/command/RenderPlayerNameTagCommand.java +++ b/src/main/java/com/lovetropics/extras/client/command/RenderPlayerNameTagCommand.java @@ -10,6 +10,7 @@ import net.minecraft.commands.Commands; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Player; +import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.event.RenderNameTagEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @@ -17,7 +18,7 @@ import static com.mojang.brigadier.arguments.BoolArgumentType.bool; import static net.minecraft.commands.Commands.literal; -@Mod.EventBusSubscriber(modid = LTExtras.MODID) +@Mod.EventBusSubscriber(modid = LTExtras.MODID, value = Dist .CLIENT) public class RenderPlayerNameTagCommand { private static boolean alwaysRenderNameTags = false;