Btw if you are trying to use mixin in scriptAPI that should be impossible. IIRC, Senk Ju onece mentioned that mixins are loaded before the scripts, but there might still be other ways of injecting. (I tried to search in the old forum but failed to find that post)
As for "onPlaceBlock", I think you can check C08PacketPlayerBlockPlacement in onPacket.
(I don't code with mcp918 so If it's wrong way plz remind me, thanks)
just remove the type C0FPacketConfirmTransaction then. Since JavaScript is a dynamically typed language, the type is determined at runtime. If the packet is a instance of a C0FPacketConfirmTransaction you can call getWindowId() and getUid() then if it is not, exceptions should be thrown.
//if (event.getPacket() instanceof C0FPacketConfirmTransaction)
packetConfirmTransaction = event.getPacket();