From f4b27de470978d8aa6858cdb5df8816ceb47fafa Mon Sep 17 00:00:00 2001 From: blockparole <48992448+blockparole@users.noreply.github.com> Date: Sun, 12 Jan 2020 22:18:01 +0100 Subject: [PATCH] noswing --- .../kami/module/modules/player/NoSwing.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/main/java/me/zeroeightsix/kami/module/modules/player/NoSwing.java diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/player/NoSwing.java b/src/main/java/me/zeroeightsix/kami/module/modules/player/NoSwing.java new file mode 100644 index 00000000..8f0ca51e --- /dev/null +++ b/src/main/java/me/zeroeightsix/kami/module/modules/player/NoSwing.java @@ -0,0 +1,23 @@ +package me.zeroeightsix.kami.module.modules.player; + +import me.zero.alpine.listener.EventHandler; +import me.zero.alpine.listener.Listener; +import me.zeroeightsix.kami.event.events.PacketEvent; +import me.zeroeightsix.kami.module.Module; +import net.minecraft.network.play.client.CPacketAnimation; + +/** + * Created 13 August 2019 by hub + * Updated 14 November 2019 by hub + */ +@Module.Info(name = "NoSwing", category = Module.Category.PLAYER, description = "Prevents arm swing animation server side") +public class NoSwing extends Module { + + @EventHandler + public Listener listener = new Listener<>(event -> { + if (event.getPacket() instanceof CPacketAnimation) { + event.cancel(); + } + }); + +}