Merge pull request #162 from blockparole/noswing

NoSwing
This commit is contained in:
Ridan Vandenbergh 2020-01-15 16:25:45 +01:00 committed by GitHub
commit 19a6eccfe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 0 deletions

View File

@ -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<PacketEvent.Send> listener = new Listener<>(event -> {
if (event.getPacket() instanceof CPacketAnimation) {
event.cancel();
}
});
}