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:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.retrooper.packetevents.wrapper.PacketWrapper
PacketWrapper.Reader<T>, PacketWrapper.Writer<T>
-
Field Summary
Fields inherited from class com.github.retrooper.packetevents.wrapper.PacketWrapper
buffer, bufferLock, clientVersion, serverVersion, user
-
Constructor Summary
ConstructorDescriptionWrapperPlayServerWindowConfirmation
(int windowId, short actionId, boolean accepted) -
Method Summary
Modifier and TypeMethodDescriptionvoid
copy
(WrapperPlayServerWindowConfirmation wrapper) short
int
boolean
void
read()
void
setAccepted
(boolean accepted) void
setActionId
(short actionID) void
setWindowId
(int windowID) void
write()
Methods inherited from class com.github.retrooper.packetevents.wrapper.PacketWrapper
createUniversalPacketWrapper, getBuffer, getChunkKey, getChunkX, getChunkZ, getClientVersion, getMaxMessageLength, getNativePacketId, getPacketId, getPacketTypeData, getRegistryHolder, getServerVersion, limitValue, prepareForSend, prepareForSend, readArray, readBitSet, readBlockPosition, readBoolean, readByte, readByteArray, readByteArray, readByteArrayOfSize, readBytes, readChatTypeBoundNetwork, readCollection, readComponent, readComponentAsJSON, readComponentAsNBT, readComponentJSON, readContainerId, readDimension, readDouble, readEntityMetadata, readEnum, readEnum, readEnumSet, readEvent, readFilterMask, readFloat, readGameMode, readIdentifier, readIdentifier, readInt, readItemStack, readItemStackModern, readKnownPack, readLastSeenMessages, readLastSeenMessagesEntry, readLastSeenMessagesPacked, readLastSeenMessagesUpdate, readLegacyLastSeenMessagesUpdate, readList, readLong, readLongArray, readLongArray, readMap, readMappedEntity, readMappedEntity, readMappedEntityOrDirect, readMappedEntityOrDirect, readMedium, readMerchantOffer, readMessageSignature, readMessageSignaturePacked, readMultiVersional, readNBT, readNBTRaw, readNode, readNullableVarInt, readOptional, readPresentItemStack, readPublicKey, readPublicProfileKey, readRemainingBytes, readRemoteChatSession, readRotation, readSaltSignature, readShort, readSignatureData, readSignedCommandArguments, readString, readString, readStyle, readTimestamp, readUnlimitedNBT, readUnlimitedNBTRaw, readUnsignedByte, readUnsignedShort, readUUID, readVarInt, readVarIntArray, readVarIntArrayOfSize, readVarLong, readVarShort, readVillagerData, readWorldBlockPosition, resetBuffer, resetByteBuf, setBuffer, setClientVersion, setNativePacketId, setPacketId, setServerVersion, writeArray, writeBitSet, writeBlockPosition, writeBoolean, writeByte, writeByteArray, writeByteArrayOfSize, writeBytes, writeChatTypeBoundNetwork, writeCollection, writeComponent, writeComponentAsJSON, writeComponentAsNBT, writeComponentJSON, writeContainerId, writeDimension, writeDouble, writeEntityMetadata, writeEntityMetadata, writeEnum, writeEnumSet, writeFilterMask, writeFloat, writeGameMode, writeIdentifier, writeIdentifier, writeInt, writeItemStack, writeItemStackModern, writeKnownPack, writeLastMessagesEntry, writeLastSeenMessages, writeLastSeenMessagesPacked, writeLastSeenMessagesUpdate, writeLegacyLastSeenMessagesUpdate, writeList, writeLong, writeLongArray, writeMap, writeMappedEntity, writeMappedEntityOrDirect, writeMedium, writeMerchantOffer, writeMessageSignature, writeMessageSignaturePacked, writeMultiVersional, writeNBT, writeNBTRaw, writeNode, writeNullableVarInt, writeOptional, writePresentItemStack, writePublicKey, writePublicProfileKey, writeRemoteChatSession, writeRotation, writeSaltSignature, writeShort, writeSignatureData, writeSignedCommandArguments, writeString, writeString, writeString, writeStyle, writeTimestamp, writeUUID, writeVarInt, writeVarIntArray, writeVarIntArrayOfSize, writeVarLong, writeVarShort, writeVillagerData, writeWorldBlockPosition
-
Constructor Details
-
WrapperPlayServerWindowConfirmation
-
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 transactionsaccepted
- Whether the action was accepted. Use false to get a response from the client.
-
-
Method Details
-
read
public void read()- Overrides:
read
in classPacketWrapper<WrapperPlayServerWindowConfirmation>
-
write
public void write()- Overrides:
write
in classPacketWrapper<WrapperPlayServerWindowConfirmation>
-
copy
- Overrides:
copy
in classPacketWrapper<WrapperPlayServerWindowConfirmation>
-
getWindowId
public int getWindowId() -
setWindowId
public void setWindowId(int windowID) -
getActionId
public short getActionId() -
setActionId
public void setActionId(short actionID) -
isAccepted
public boolean isAccepted() -
setAccepted
public void setAccepted(boolean accepted)
-