[java] PacketDebugger by Rise
-
package net.ccbluex.liquidbounce.features.module.modules.render;
import net.ccbluex.liquidbounce.LiquidBounce;
import net.ccbluex.liquidbounce.event.EventTarget;
import net.ccbluex.liquidbounce.event.PacketEvent;
import net.ccbluex.liquidbounce.features.module.Module;
import net.ccbluex.liquidbounce.features.module.ModuleCategory;
import net.ccbluex.liquidbounce.features.module.ModuleInfo;
import net.ccbluex.liquidbounce.utils.ClientUtils;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C00PacketKeepAlive;
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
import net.minecraft.network.play.server.S3FPacketCustomPayload;@ModuleInfo(name = "PacketDebugger", description = "Debugger for detecting anticheats", category = ModuleCategory.RENDER)
public final class PacketDebugger extends Module {
private long lastKeepAlive;
private long lastTransaction;@EventTarget public void onPacket(final PacketEvent event) { Packet p = event.getPacket(); if (p instanceof C0FPacketConfirmTransaction) { long lastPacket = System.currentTimeMillis() - lastTransaction; ClientUtils.displayChatMessage("Transaction: " + ((C0FPacketConfirmTransaction) event.getPacket()).getWindowId() + " " + ((C0FPacketConfirmTransaction) event.getPacket()).getUid() + " " + lastPacket + "ms"); this.lastTransaction = System.currentTimeMillis(); } else if (p instanceof C00PacketKeepAlive) { long lastPacket = System.currentTimeMillis() - lastKeepAlive; ClientUtils.displayChatMessage("KeepAlive: " + ((C00PacketKeepAlive) event.getPacket()).getKey() + " " + lastPacket + "ms"); this.lastKeepAlive = System.currentTimeMillis(); } else if (p instanceof S3FPacketCustomPayload) { ClientUtils.displayChatMessage("Payload: " + ((S3FPacketCustomPayload) event.getPacket()).getChannelName()); } }
}
-
@hacked-clients-minecraft you should use the inline code option
-
@stfwissue said in [java] PacketDebugger by Rise:
you should use the inline code option
Thank you! I'm just new to the forum
-
@hacked-clients-minecraft okay then, and no problem