Class WrapperPlayClientWindowConfirmation
java.lang.Object
com.github.retrooper.packetevents.wrapper.PacketWrapper<WrapperPlayClientWindowConfirmation>
com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientWindowConfirmation
public class WrapperPlayClientWindowConfirmation
extends PacketWrapper<WrapperPlayClientWindowConfirmation>
A response to the window confirmation packet by the client
It is processed on the main thread, and is therefore very useful for anticheat purposes
If a confirmation sent by the client was not accepted, the server will reply with a
WrapperPlayServerWindowConfirmation
packet with the Accepted field set to false. When this happens,
the client must send this packet to apologize (as with movement),
otherwise the server ignores any successive confirmations.
Replaced in 1.17 with the more efficient WrapperPlayClientPong
- 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
ConstructorDescriptionWrapperPlayClientWindowConfirmation
(int windowId, short actionId, boolean accepted) -
Method Summary
Modifier and TypeMethodDescriptionvoid
copy
(WrapperPlayClientWindowConfirmation 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
-
WrapperPlayClientWindowConfirmation
-
WrapperPlayClientWindowConfirmation
public WrapperPlayClientWindowConfirmation(int windowId, short actionId, boolean accepted)
-
-
Method Details
-
read
public void read()- Overrides:
read
in classPacketWrapper<WrapperPlayClientWindowConfirmation>
-
write
public void write()- Overrides:
write
in classPacketWrapper<WrapperPlayClientWindowConfirmation>
-
copy
- Overrides:
copy
in classPacketWrapper<WrapperPlayClientWindowConfirmation>
-
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)
-