Contents
- Description
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- getInteractionPacketQueue()
- getPlayerRef()
- setPlayerRef(PlayerRef)
- getIdentifier()
- getAccountProfile()
- sendCommandTree()
- closed(NetworkChannel)
- disconnect(FormattedMessage)
- handle(ClientDisconnect)
- handleMouseInteraction(MouseInteraction, PlayerRef, Ref, World, Store)
- handle(ClientMovement)
- handle(ChatMessage)
- handle(ArgValuesRequest)
- handle(CustomPageEvent)
- handle(ExecuteServersidePageCommand)
- handle(DismissServersidePage)
- handle(ExecuteServersideHudCommand)
- handleChapterRewardsPageResult(ChapterRewardsPageResult, PlayerRef, Ref, World, Store)
- handleViewRadius(ViewRadius, PlayerRef, Ref, World, Store)
- handleUpdateLanguage(UpdateLanguage, PlayerRef, Ref, World, Store)
- handleSendWindowAction(SendWindowAction, PlayerRef, Ref, World, Store)
- handleSyncPlayerPreferences(SyncPlayerPreferences, PlayerRef, Ref, World, Store)
- handleRemoveMapMarker(RemoveMapMarker, PlayerRef, Ref, World, Store)
- handleCloseWindow(CloseWindow, PlayerRef, Ref, World, Store)
- handle(UpdateServerAccess)
- handle(ConfigureIcePeer)
- handle(SetServerAccess)
- handle(RequestMachinimaActorModel)
- handleUpdateMachinimaScene(UpdateMachinimaScene, PlayerRef, Ref, World, Store)
- handle(ClientReady)
- handleUpdateWorldMapVisible(UpdateWorldMapVisible, PlayerRef, Ref, World, Store)
- handleTeleportToWorldMapMarker(TeleportToWorldMapMarker, PlayerRef, Ref, World, Store)
- handleTeleportToWorldMapPosition(TeleportToWorldMapPosition, PlayerRef, Ref, World, Store)
- handleCreateUserMarker(CreateUserMarker, PlayerRef, Ref, World, Store)
- handle(SyncInteractionChains)
- handleMountMovement(MountMovement, PlayerRef, Ref, World, Store)
- handlePlayEmote(PlayEmote, PlayerRef, Ref, World, Store)
- handleSetPaused(SetPaused, PlayerRef, Ref, World, Store)
- handleRequestFlyCameraMode(RequestFlyCameraMode, PlayerRef, Ref, World, Store)
- handleRequestNoClip(RequestNoClip, PlayerRef, Ref, World, Store)
Class GamePacketHandler
java.lang.Object
com.hypixel.hytale.server.core.io.PacketHandler
com.hypixel.hytale.server.core.io.handlers.GenericPacketHandler
com.hypixel.hytale.server.core.io.handlers.game.GamePacketHandler
- All Implemented Interfaces:
ConnectionHandler, IPacketHandler, IPacketReceiver
-
Nested Class Summary
Nested classes/interfaces inherited from class PacketHandler
PacketHandler.DisconnectReason, PacketHandler.PingInfo -
Field Summary
Fields inherited from class PacketHandler
DEFAULT_STREAM_PRIORITIES, MAX_PACKET_ID -
Constructor Summary
ConstructorsConstructorDescriptionGamePacketHandler(ChannelConnection channel, ProtocolVersion protocolVersion, PlayerAuthentication auth) Default Constructor for aGamePacketHandlerinstance -
Method Summary
Modifier and TypeMethodDescriptionvoidclosed(NetworkChannel networkChannel) Called when the affiliated network channel has been closed.voiddisconnect(FormattedMessage message) Called to disconnect this connection for the given reason.Returns the account to track for lookups, bans, and kicks.voidhandle(ClientDisconnect packet) A callback to handleClientDisconnectpackets from the client.voidhandle(SyncInteractionChains packet) A callback to handleSyncInteractionChainpackets from the client.voidhandle(ArgValuesRequest packet) voidhandle(ChatMessage packet) A callback to handleChatMessagepackets from the client.voidhandle(CustomPageEvent packet) A callback to handleCustomPageEventpackets from the client.voidhandle(DismissServersidePage packet) A callback to handleDismissServersidePagepackets from the client.voidhandle(ExecuteServersideHudCommand packet) A callback to handleExecuteServersideHudCommandpackets from the client.voidhandle(ExecuteServersidePageCommand packet) A callback to handleExecuteServersidePageCommandpackets from the client.voidhandle(RequestMachinimaActorModel packet) A callback to handleRequestMachinimaActorModelpackets from the client.voidhandle(ClientMovement packet) A callback to handleClientMovementpackets from the client.voidhandle(ClientReady packet) A callback to handleClientReadypackets from the client.voidhandle(ConfigureIcePeer packet) A callback to handleConfigureIcePeerpackets from the client.voidhandle(SetServerAccess packet) A callback to handleSetServerAccesspackets from the client.voidhandle(UpdateServerAccess packet) A callback to handleUpdateServerAccesspackets from the client.voidhandleChapterRewardsPageResult(ChapterRewardsPageResult packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleChapterRewardsPageResultpackets from the client.voidhandleCloseWindow(CloseWindow packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleCloseWindowpackets from the client.voidhandleCreateUserMarker(CreateUserMarker packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) voidhandleMountMovement(MountMovement packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleMountMovementpackets from the client.voidhandleMouseInteraction(MouseInteraction packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleMouseInteractionpackets from the client.voidhandlePlayEmote(PlayEmote packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handlePlayEmotepackets from the client.voidhandleRemoveMapMarker(RemoveMapMarker packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleRemoveMapMarkerpackets from the client.voidhandleRequestFlyCameraMode(RequestFlyCameraMode packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleRequestFlyCameraModepackets from the client.voidhandleRequestNoClip(RequestNoClip packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleRequestNoClippackets from the client.voidhandleSendWindowAction(SendWindowAction packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleSendWindowActionpackets from the client.voidhandleSetPaused(SetPaused packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleSetPausedpackets from the client.static voidhandleSyncPlayerPreferences(SyncPlayerPreferences packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleSyncPlayerPreferencespackets from the client.voidhandleTeleportToWorldMapMarker(TeleportToWorldMapMarker packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleTeleportToWorldMapMarkerpackets from the client.voidhandleTeleportToWorldMapPosition(TeleportToWorldMapPosition packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleTeleportToWorldMapPositionpackets from the client.voidhandleUpdateLanguage(UpdateLanguage packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleUpdateLanguagepackets from the client.voidhandleUpdateMachinimaScene(UpdateMachinimaScene packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleUpdateMachinimaScenepackets from the client.voidhandleUpdateWorldMapVisible(UpdateWorldMapVisible packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleUpdateWorldMapVisiblepackets from the client.voidhandleViewRadius(ViewRadius packet, PlayerRef playerRef, Ref<EntityStore> ref, World world, Store<EntityStore> store) A callback to handleViewRadiuspackets from the client.voidvoidsetPlayerRef(PlayerRef playerRef) Sets the player ref associated with this handlerMethods inherited from class GenericPacketHandler
accept, getSubPacketHandler, newHandlerArray, registerHandler, registerNoOpHandlers, registerSubPacketHandlerMethods inherited from class PacketHandler
checkStreamOpenRateLimit, compareAndSetChannel, disconnect, getAuth, getAuxiliaryChannelCount, getChannel, getChannel, getChannel, getClientReadyForChunksFuture, getDisconnectReason, getOperationTimeoutThreshold, getPacketStatsRecorder, getPingInfo, getProtocolVersion, getQueuedPacketsCount, getSniHostname, handle, handlePong, isLANConnection, isLocalConnection, logCloseMessage, logConnectionTimings, registered, sendPing, setChannel, setChannel, setClientReadyForChunksFuture, setQueuePackets, stillActive, tickPing, tryFlush, unregistered, write, write, write, writeNoCache, writePacketMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IPacketHandler
registerHandler, registerNoOpHandlers
-
Constructor Details
-
GamePacketHandler
public GamePacketHandler(@Nonnull ChannelConnection channel, @Nonnull ProtocolVersion protocolVersion, @Nonnull PlayerAuthentication auth) Default Constructor for aGamePacketHandlerinstance- Parameters:
channel- The network channel associated with this handlerprotocolVersion- The network protocol versionauth- The authentication of the associated player
-
-
Method Details
-
getInteractionPacketQueue
-
getPlayerRef
- Specified by:
getPlayerRefin interfaceIPacketHandler- Returns:
- the
PlayerRefof the connection associated with this handler.
-
setPlayerRef
Sets the player ref associated with this handler- Parameters:
playerRef- The player ref to set
-
getIdentifier
- Specified by:
getIdentifierin interfaceIPacketHandler- Specified by:
getIdentifierin classPacketHandler- Returns:
- the unique identifier for this handler
-
getAccountProfile
Description copied from class:PacketHandlerReturns the account to track for lookups, bans, and kicks.Override this method for authenticated handlers. The profile must be available before registration and remain available through cleanup. The account UUID and whether this method returns
nullmust remain stable for this handler's lifetime. Keep this method nonblocking and free of side effects. Registry membership does not perform access checks.- Overrides:
getAccountProfilein classPacketHandler- Returns:
- the account to track, or
nullto exclude this handler
-
sendCommandTree
public void sendCommandTree() -
closed
Description copied from interface:ConnectionHandlerCalled when the affiliated network channel has been closed.- Specified by:
closedin interfaceConnectionHandler- Overrides:
closedin classPacketHandler- Parameters:
networkChannel- The network channel that was closed, or null if unknown
-
disconnect
Description copied from class:PacketHandlerCalled to disconnect this connection for the given reason.- Overrides:
disconnectin classPacketHandler- Parameters:
message- The formatted reason in which the connection is being disconnected
-
handle
A callback to handleClientDisconnectpackets from the client.- Parameters:
packet- The receivedClientDisconnectpacket.
-
handleMouseInteraction
public void handleMouseInteraction(@Nonnull MouseInteraction packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleMouseInteractionpackets from the client.- Parameters:
packet- The receivedMouseInteractionpacket.
-
handle
A callback to handleClientMovementpackets from the client.- Parameters:
packet- The receivedClientMovementpacket.
-
handle
A callback to handleChatMessagepackets from the client.- Parameters:
packet- The receivedChatMessagepacket.
-
handle
-
handle
A callback to handleCustomPageEventpackets from the client.- Parameters:
packet- The receivedCustomPageEventpacket.
-
handle
A callback to handleExecuteServersidePageCommandpackets from the client.- Parameters:
packet- The receivedExecuteServersidePageCommandpacket.
-
handle
A callback to handleDismissServersidePagepackets from the client. Sent when the player closes a server-side page client-side so the server can run teardown and lifecycle hooks.- Parameters:
packet- The receivedDismissServersidePagepacket.
-
handle
A callback to handleExecuteServersideHudCommandpackets from the client.- Parameters:
packet- The receivedExecuteServersideHudCommandpacket.
-
handleChapterRewardsPageResult
public void handleChapterRewardsPageResult(@Nonnull ChapterRewardsPageResult packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleChapterRewardsPageResultpackets from the client.- Parameters:
packet- The receivedChapterRewardsPageResultpacket.
-
handleViewRadius
public void handleViewRadius(@Nonnull ViewRadius packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleViewRadiuspackets from the client.- Parameters:
packet- The receivedViewRadiuspacket.
-
handleUpdateLanguage
public void handleUpdateLanguage(@Nonnull UpdateLanguage packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleUpdateLanguagepackets from the client.- Parameters:
packet- The receivedUpdateLanguagepacket.
-
handleSendWindowAction
public void handleSendWindowAction(@Nonnull SendWindowAction packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleSendWindowActionpackets from the client.- Parameters:
packet- The receivedSendWindowActionpacket.
-
handleSyncPlayerPreferences
public static void handleSyncPlayerPreferences(@Nonnull SyncPlayerPreferences packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleSyncPlayerPreferencespackets from the client.- Parameters:
packet- The receivedSyncPlayerPreferencespacket.
-
handleRemoveMapMarker
public void handleRemoveMapMarker(@Nonnull RemoveMapMarker packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleRemoveMapMarkerpackets from the client.- Parameters:
packet- The receivedRemoveMapMarkerpacket.
-
handleCloseWindow
public void handleCloseWindow(@Nonnull CloseWindow packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleCloseWindowpackets from the client.- Parameters:
packet- The receivedCloseWindowpacket.
-
handle
A callback to handleUpdateServerAccesspackets from the client.- Parameters:
packet- The receivedUpdateServerAccesspacket.
-
handle
A callback to handleConfigureIcePeerpackets from the client.- Parameters:
packet- The receivedConfigureIcePeerpacket.
-
handle
A callback to handleSetServerAccesspackets from the client.- Parameters:
packet- The receivedSetServerAccesspacket.
-
handle
A callback to handleRequestMachinimaActorModelpackets from the client.- Parameters:
packet- The receivedRequestMachinimaActorModelpacket.
-
handleUpdateMachinimaScene
public void handleUpdateMachinimaScene(@Nonnull UpdateMachinimaScene packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleUpdateMachinimaScenepackets from the client.- Parameters:
packet- The receivedUpdateMachinimaScenepacket.
-
handle
A callback to handleClientReadypackets from the client.- Parameters:
packet- The receivedClientReadypacket.
-
handleUpdateWorldMapVisible
public void handleUpdateWorldMapVisible(@Nonnull UpdateWorldMapVisible packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleUpdateWorldMapVisiblepackets from the client.- Parameters:
packet- The receivedUpdateWorldMapVisiblepacket.
-
handleTeleportToWorldMapMarker
public void handleTeleportToWorldMapMarker(@Nonnull TeleportToWorldMapMarker packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleTeleportToWorldMapMarkerpackets from the client.- Parameters:
packet- The receivedTeleportToWorldMapMarkerpacket.
-
handleTeleportToWorldMapPosition
public void handleTeleportToWorldMapPosition(@Nonnull TeleportToWorldMapPosition packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleTeleportToWorldMapPositionpackets from the client.- Parameters:
packet- The receivedTeleportToWorldMapPositionpacket.
-
handleCreateUserMarker
public void handleCreateUserMarker(@Nonnull CreateUserMarker packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) -
handle
A callback to handleSyncInteractionChainpackets from the client.- Parameters:
packet- The receivedSyncInteractionChainpacket.
-
handleMountMovement
public void handleMountMovement(@Nonnull MountMovement packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleMountMovementpackets from the client.- Parameters:
packet- The receivedMountMovementpacket.
-
handlePlayEmote
public void handlePlayEmote(@Nonnull PlayEmote packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handlePlayEmotepackets from the client. Replicates the emote to all players that can see this entity viaAnimationUtils.- Parameters:
packet- The receivedPlayEmotepacket.
-
handleSetPaused
public void handleSetPaused(@Nonnull SetPaused packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleSetPausedpackets from the client.- Parameters:
packet- The receivedSetPausedpacket.
-
handleRequestFlyCameraMode
public void handleRequestFlyCameraMode(@Nonnull RequestFlyCameraMode packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleRequestFlyCameraModepackets from the client.- Parameters:
packet- The receivedRequestFlyCameraModepacket.
-
handleRequestNoClip
public void handleRequestNoClip(@Nonnull RequestNoClip packet, @Nonnull PlayerRef playerRef, @Nonnull Ref<EntityStore> ref, @Nonnull World world, @Nonnull Store<EntityStore> store) A callback to handleRequestNoClippackets from the client. The server is authoritative for no-clip: it validates the permission and echoes the result back viaSetNoClip.- Parameters:
packet- The receivedRequestNoClippacket.
-