Interface ServerPacket
- All Superinterfaces:
NetworkBuffer.Writer
,SendablePacket
- All Known Subinterfaces:
ServerPacket.Configuration
,ServerPacket.Login
,ServerPacket.Play
,ServerPacket.Status
- All Known Implementing Classes:
AcknowledgeBlockChangePacket
,ActionBarPacket
,AdvancementsPacket
,AttachEntityPacket
,BlockActionPacket
,BlockBreakAnimationPacket
,BlockChangePacket
,BlockEntityDataPacket
,BossBarPacket
,BundlePacket
,CameraPacket
,ChangeGameStatePacket
,ChunkBatchFinishedPacket
,ChunkBatchStartPacket
,ChunkDataPacket
,ClearTitlesPacket
,CloseWindowPacket
,CollectItemPacket
,CraftRecipeResponse
,CustomChatCompletionPacket
,DamageEventPacket
,DeathCombatEventPacket
,DeclareCommandsPacket
,DeclareRecipesPacket
,DeleteChatPacket
,DestroyEntitiesPacket
,DisconnectPacket
,DisplayScoreboardPacket
,EffectPacket
,EncryptionRequestPacket
,EndCombatEventPacket
,EnterCombatEventPacket
,EntityAnimationPacket
,EntityEffectPacket
,EntityEquipmentPacket
,EntityHeadLookPacket
,EntityMetaDataPacket
,EntityPositionAndRotationPacket
,EntityPositionPacket
,EntityPropertiesPacket
,EntityRotationPacket
,EntitySoundEffectPacket
,EntityStatusPacket
,EntityTeleportPacket
,EntityVelocityPacket
,ExplosionPacket
,FacePlayerPacket
,FinishConfigurationPacket
,HeldItemChangePacket
,HitAnimationPacket
,InitializeWorldBorderPacket
,JoinGamePacket
,KeepAlivePacket
,LoginDisconnectPacket
,LoginPluginRequestPacket
,LoginSuccessPacket
,MapDataPacket
,MultiBlockChangePacket
,NbtQueryResponsePacket
,OpenBookPacket
,OpenHorseWindowPacket
,OpenSignEditorPacket
,OpenWindowPacket
,ParticlePacket
,PingPacket
,PingResponsePacket
,PlayerAbilitiesPacket
,PlayerChatMessagePacket
,PlayerInfoRemovePacket
,PlayerInfoUpdatePacket
,PlayerListHeaderAndFooterPacket
,PlayerPositionAndLookPacket
,PluginMessagePacket
,RegistryDataPacket
,RemoveEntityEffectPacket
,ResetScorePacket
,ResourcePackPopPacket
,ResourcePackPushPacket
,RespawnPacket
,ResponsePacket
,ScoreboardObjectivePacket
,SelectAdvancementTabPacket
,ServerDataPacket
,ServerDifficultyPacket
,SetCompressionPacket
,SetCooldownPacket
,SetExperiencePacket
,SetPassengersPacket
,SetSlotPacket
,SetTickStatePacket
,SetTitleSubTitlePacket
,SetTitleTextPacket
,SetTitleTimePacket
,SoundEffectPacket
,SpawnEntityPacket
,SpawnExperienceOrbPacket
,SpawnPositionPacket
,StartConfigurationPacket
,StatisticsPacket
,StopSoundPacket
,SystemChatPacket
,TabCompletePacket
,TagsPacket
,TeamsPacket
,TickStepPacket
,TimeUpdatePacket
,TradeListPacket
,UnloadChunkPacket
,UnlockRecipesPacket
,UpdateEnabledFeaturesPacket
,UpdateHealthPacket
,UpdateLightPacket
,UpdateScorePacket
,UpdateSimulationDistancePacket
,UpdateViewDistancePacket
,UpdateViewPositionPacket
,VehicleMovePacket
,WindowItemsPacket
,WindowPropertyPacket
,WorldBorderCenterPacket
,WorldBorderLerpSizePacket
,WorldBorderSizePacket
,WorldBorderWarningDelayPacket
,WorldBorderWarningReachPacket
public sealed interface ServerPacket
extends NetworkBuffer.Writer, SendablePacket
permits ServerPacket.Configuration, ServerPacket.Status, ServerPacket.Login, ServerPacket.Play
Represents a packet which can be sent to a player using
PlayerConnection.sendPacket(SendablePacket)
.
Packets are value-based, and should therefore not be reliant on identity.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
static interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptiondefault int
getId
(@NotNull ConnectionState state) Gets the id of this packet.Methods inherited from interface net.minestom.server.network.NetworkBuffer.Writer
write
-
Method Details
-
getId
Gets the id of this packet.Written in the final buffer header so it needs to match the client id.
- Returns:
- the id of this packet
-