Class AbstractPacket
java.lang.Object
com.comphenix.packetwrapper.wrappers.AbstractPacket
- Direct Known Subclasses:
WrapperHandshakingClientSetProtocol
,WrapperLoginClientCustomPayload
,WrapperLoginClientEncryptionBegin
,WrapperLoginClientStart
,WrapperLoginServerCustomPayload
,WrapperLoginServerDisconnect
,WrapperLoginServerEncryptionBegin
,WrapperLoginServerSetCompression
,WrapperLoginServerSuccess
,WrapperPlayClientAbilities
,WrapperPlayClientAdvancements
,WrapperPlayClientArmAnimation
,WrapperPlayClientAutoRecipe
,WrapperPlayClientBeacon
,WrapperPlayClientBEdit
,WrapperPlayClientBlockDig
,WrapperPlayClientBoatMove
,WrapperPlayClientChat
,WrapperPlayClientChatAck
,WrapperPlayClientChatCommand
,WrapperPlayClientChatSessionUpdate
,WrapperPlayClientClientCommand
,WrapperPlayClientCloseWindow
,WrapperPlayClientCustomPayload
,WrapperPlayClientDifficultyChange
,WrapperPlayClientDifficultyLock
,WrapperPlayClientEnchantItem
,WrapperPlayClientEntityAction
,WrapperPlayClientEntityNbtQuery
,WrapperPlayClientGround
,WrapperPlayClientHeldItemSlot
,WrapperPlayClientItemName
,WrapperPlayClientJigsawGenerate
,WrapperPlayClientKeepAlive
,WrapperPlayClientLook
,WrapperPlayClientPickItem
,WrapperPlayClientPong
,WrapperPlayClientPosition
,WrapperPlayClientPositionLook
,WrapperPlayClientRecipeDisplayed
,WrapperPlayClientRecipeSettings
,WrapperPlayClientResourcePackStatus
,WrapperPlayClientSetCommandBlock
,WrapperPlayClientSetCommandMinecart
,WrapperPlayClientSetCreativeSlot
,WrapperPlayClientSetJigsaw
,WrapperPlayClientSettings
,WrapperPlayClientSpectate
,WrapperPlayClientSteerVehicle
,WrapperPlayClientStruct
,WrapperPlayClientTabComplete
,WrapperPlayClientTeleportAccept
,WrapperPlayClientTileNbtQuery
,WrapperPlayClientTrSel
,WrapperPlayClientUpdateSign
,WrapperPlayClientUseEntity
,WrapperPlayClientUseItem
,WrapperPlayClientVehicleMove
,WrapperPlayClientWindowClick
,WrapperPlayServerAbilities
,WrapperPlayServerAdvancements
,WrapperPlayServerAnimation
,WrapperPlayServerAttachEntity
,WrapperPlayServerAutoRecipe
,WrapperPlayServerBlockAction
,WrapperPlayServerBlockBreakAnimation
,WrapperPlayServerBlockChange
,WrapperPlayServerBlockChangedAck
,WrapperPlayServerBoss
,WrapperPlayServerBundle
,WrapperPlayServerCamera
,WrapperPlayServerChat
,WrapperPlayServerChunksBiomes
,WrapperPlayServerClearTitles
,WrapperPlayServerCloseWindow
,WrapperPlayServerCollect
,WrapperPlayServerCommands
,WrapperPlayServerCustomChatCompletions
,WrapperPlayServerCustomPayload
,WrapperPlayServerDamageEvent
,WrapperPlayServerDeleteChatMessage
,WrapperPlayServerDisguisedChat
,WrapperPlayServerEntityDestroy
,WrapperPlayServerEntityEffect
,WrapperPlayServerEntityEquipment
,WrapperPlayServerEntityHeadRotation
,WrapperPlayServerEntityLook
,WrapperPlayServerEntityMetadata
,WrapperPlayServerEntitySound
,WrapperPlayServerEntityStatus
,WrapperPlayServerEntityTeleport
,WrapperPlayServerEntityVelocity
,WrapperPlayServerExperience
,WrapperPlayServerExplosion
,WrapperPlayServerGameStateChange
,WrapperPlayServerHeldItemSlot
,WrapperPlayServerHurtAnimation
,WrapperPlayServerInitializeBorder
,WrapperPlayServerKeepAlive
,WrapperPlayServerKickDisconnect
,WrapperPlayServerLightUpdate
,WrapperPlayServerLogin
,WrapperPlayServerLookAt
,WrapperPlayServerMap
,WrapperPlayServerMapChunk
,WrapperPlayServerMount
,WrapperPlayServerMultiBlockChange
,WrapperPlayServerNamedEntitySpawn
,WrapperPlayServerNamedSoundEffect
,WrapperPlayServerNbtQuery
,WrapperPlayServerOpenBook
,WrapperPlayServerOpenSignEditor
,WrapperPlayServerOpenWindow
,WrapperPlayServerOpenWindowHorse
,WrapperPlayServerOpenWindowMerchant
,WrapperPlayServerPing
,WrapperPlayServerPlayerCombatEnd
,WrapperPlayServerPlayerCombatEnter
,WrapperPlayServerPlayerCombatKill
,WrapperPlayServerPlayerInfo
,WrapperPlayServerPlayerInfoRemove
,WrapperPlayServerPlayerListHeaderFooter
,WrapperPlayServerPosition
,WrapperPlayServerRecipes
,WrapperPlayServerRecipeUpdate
,WrapperPlayServerRelEntityMove
,WrapperPlayServerRelEntityMoveLook
,WrapperPlayServerRemoveEntityEffect
,WrapperPlayServerResourcePackSend
,WrapperPlayServerRespawn
,WrapperPlayServerScoreboardDisplayObjective
,WrapperPlayServerScoreboardObjective
,WrapperPlayServerScoreboardScore
,WrapperPlayServerScoreboardTeam
,WrapperPlayServerSelectAdvancementTab
,WrapperPlayServerServerData
,WrapperPlayServerServerDifficulty
,WrapperPlayServerSetActionBarText
,WrapperPlayServerSetBorderCenter
,WrapperPlayServerSetBorderLerpSize
,WrapperPlayServerSetBorderSize
,WrapperPlayServerSetBorderWarningDelay
,WrapperPlayServerSetBorderWarningDistance
,WrapperPlayServerSetCooldown
,WrapperPlayServerSetSlot
,WrapperPlayServerSetSubtitleText
,WrapperPlayServerSetTitlesAnimation
,WrapperPlayServerSetTitleText
,WrapperPlayServerSpawnEntity
,WrapperPlayServerSpawnEntityExperienceOrb
,WrapperPlayServerSpawnPosition
,WrapperPlayServerStatistic
,WrapperPlayServerStopSound
,WrapperPlayServerSystemChat
,WrapperPlayServerTabComplete
,WrapperPlayServerTags
,WrapperPlayServerTileEntityData
,WrapperPlayServerUnloadChunk
,WrapperPlayServerUpdateAttributes
,WrapperPlayServerUpdateEnabledFeatures
,WrapperPlayServerUpdateHealth
,WrapperPlayServerUpdateSimulationDistance
,WrapperPlayServerUpdateTime
,WrapperPlayServerVehicleMove
,WrapperPlayServerViewCentre
,WrapperPlayServerViewDistance
,WrapperPlayServerWindowData
,WrapperPlayServerWindowItems
,WrapperPlayServerWorldEvent
,WrapperPlayServerWorldParticles
,WrapperStatusClientPing
,WrapperStatusClientStart
,WrapperStatusServerPong
,WrapperStatusServerServerInfo
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractPacket
(com.comphenix.protocol.events.PacketContainer handle, com.comphenix.protocol.PacketType type) Constructs a new strongly typed wrapper for the given packet.AbstractPacket
(com.comphenix.protocol.PacketType type) Constructs a new strongly typed wrapper for the given packet and initialize it with a default packet instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Send the current packet to all online players.boolean
com.comphenix.protocol.events.PacketContainer
Retrieve a handle to the raw packet data.int
hashCode()
void
receivePacket
(org.bukkit.entity.Player sender) Simulate receiving the current packet from the given sender.void
sendPacket
(org.bukkit.entity.Player receiver) Send the current packet to the given receiver.
-
Field Details
-
handle
protected com.comphenix.protocol.events.PacketContainer handle
-
-
Constructor Details
-
AbstractPacket
protected AbstractPacket(com.comphenix.protocol.events.PacketContainer handle, com.comphenix.protocol.PacketType type) Constructs a new strongly typed wrapper for the given packet.- Parameters:
handle
- - handle to the raw packet data.type
- - the packet type.
-
AbstractPacket
public AbstractPacket(com.comphenix.protocol.PacketType type) Constructs a new strongly typed wrapper for the given packet and initialize it with a default packet instance.- Parameters:
type
- - the packet type.
-
-
Method Details
-
getHandle
public com.comphenix.protocol.events.PacketContainer getHandle()Retrieve a handle to the raw packet data.- Returns:
- Raw packet data.
-
sendPacket
public void sendPacket(org.bukkit.entity.Player receiver) Send the current packet to the given receiver.- Parameters:
receiver
- - the receiver.- Throws:
RuntimeException
- If the packet cannot be sent.
-
broadcastPacket
public void broadcastPacket()Send the current packet to all online players. -
receivePacket
public void receivePacket(org.bukkit.entity.Player sender) Simulate receiving the current packet from the given sender.- Parameters:
sender
- - the sender.- Throws:
RuntimeException
- if the packet cannot be received.
-
equals
-
hashCode
public int hashCode()
-