@ButterChicken That's what you were supposed to do.
@CzechHek said in Where is the mistake?:
@ButterChicken Title messages are often in siblings or smth, print the component and find where the "Victory!" is.
Here is the documentation: https://scriptapi.liquidbounce.net/net/minecraft/util/ChatComponentText.html
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();