From e0a3392795c7abc0c1080d71b6c0d83c8de78a2d Mon Sep 17 00:00:00 2001 From: anhgelus Date: Wed, 21 Aug 2024 23:29:47 +0000 Subject: feat(player): disable tab --- .../anhgelus/molehunt/client/mixin/NoPlayerListHud.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/client/java/world/anhgelus/molehunt/client/mixin/NoPlayerListHud.java (limited to 'src/client/java') diff --git a/src/client/java/world/anhgelus/molehunt/client/mixin/NoPlayerListHud.java b/src/client/java/world/anhgelus/molehunt/client/mixin/NoPlayerListHud.java new file mode 100644 index 0000000..8ef33fd --- /dev/null +++ b/src/client/java/world/anhgelus/molehunt/client/mixin/NoPlayerListHud.java @@ -0,0 +1,15 @@ +package world.anhgelus.molehunt.client.mixin; + +import net.minecraft.client.gui.hud.PlayerListHud; +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(PlayerListHud.class) +public class NoPlayerListHud { + @Inject(at = @At("HEAD"), method = "render", cancellable = true) + public void render(CallbackInfo ci) { + ci.cancel(); + } +} -- cgit v1.2.3