Does anyone know why it doesnt work?
-
help
var script = registerScript({ name: "xddd", version: "0.0.0", authors: ["lol"] }); script.registerModule({ name: "xddd", category: "Fun", description: "" }, function (module) { module.on("packet", function(e) { var packet = e.getPacket() if (packet instanceof C0BPacketEntityAction && packet.getAction() == C0BPacketEntityAction.Action.OPEN_INVENTORY) { Chat.print("[DEBUG] C0BPacketEntityAction.Action.OPEN_INVENTORY"); e.cancelEvent(); } }); }); var C0BPacketEntityAction = Java.type('net.minecraft.network.play.client.C0BPacketEntityAction');
-
@skidma Action cannot be like Action.OPEN_INVENTORY.
use packet.getAction() == "OPEN_INVENTORY" instead -
@idk-my-name This doesnt work and why C0BPacketEntityAction.Action.START_SPRINTING works