CubeCraft Disabler
-
Code
KillAura killAura = (KillAura) LiquidBounce.moduleManager.getModule(KillAura.class); EntityPlayerSP entityPlayerSP; @EventTarget public void onPacket(PacketEvent event) { if(killAura == null) { return; } Packet p = event.getPacket(); if (p instanceof C03PacketPlayer.C06PacketPlayerPosLook && !Objects.requireNonNull(LiquidBounce.moduleManager.getModule(Scaffold.class)).isToggled()) { event.cancelEvent(); } if (p instanceof C03PacketPlayer && !((C03PacketPlayer)p).isMoving() && !mc.thePlayer.isUsingItem()) { event.cancelEvent(); } if (p instanceof C00PacketKeepAlive) { event.cancelEvent(); } if (p instanceof C0FPacketConfirmTransaction) { event.cancelEvent(); } if (p instanceof C0CPacketInput) { event.cancelEvent(); } if (p instanceof C01PacketPing) { event.cancelEvent(); } if (killAura.getTarget() == null) { assert (p instanceof C0BPacketEntityAction); C0BPacketEntityAction c0B = (C0BPacketEntityAction)p; if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) { if (entityPlayerSP.serverSprintState) { sendPacketSilent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING)); entityPlayerSP.serverSprintState = false; } event.cancelEvent(); } } } public void sendPacketSilent(Packet packet) { mc.getNetHandler().getNetworkManager().sendPacket(packet, null, new GenericFutureListener[0]); }