Class WrapperPlayServerWindowConfirmation

java.lang.Object
com.github.retrooper.packetevents.wrapper.PacketWrapper<WrapperPlayServerWindowConfirmation>
com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerWindowConfirmation

public class WrapperPlayServerWindowConfirmation extends PacketWrapper<WrapperPlayServerWindowConfirmation>
Using this packet, you may confirm with 100% certainty whether the client could have received a packet or has 100% received and processed the previous packet, by sending a window confirmation before and after the packet you want to track. Very useful for anticheat purposes.

To get a client to respond every time, use windowID 0, any action ID, and accepted = false

A packet from the server indicating whether a request from the client was accepted, or whether there was a conflict (due to lag). If the packet was not accepted, the client must respond with a serverbound window confirmation packet.

Replaced in 1.17 with the more efficient WrapperPlayServerPing

See Also:
  • Constructor Details

    • WrapperPlayServerWindowConfirmation

      public WrapperPlayServerWindowConfirmation(PacketSendEvent event)
    • WrapperPlayServerWindowConfirmation

      public WrapperPlayServerWindowConfirmation(int windowId, short actionId, boolean accepted)
      Parameters:
      windowId - The ID of the window that the action occurred in. Use 0 for the player's inventory, as to always get a response (in combination with accepted = false)
      actionId - Every action that is to be accepted has a unique number. This number is an incrementing integer (starting at 1) with separate counts for each window ID. Using non-positive numbers is recommended to avoid conflicting with vanilla transactions
      accepted - Whether the action was accepted. Use false to get a response from the client.
  • Method Details