Interface ServerPacket

All Superinterfaces:
SendablePacket, Writeable
All Known Subinterfaces:
ComponentHoldingServerPacket
All Known Implementing Classes:
AcknowledgePlayerDiggingPacket, ActionBarPacket, AdvancementsPacket, AttachEntityPacket, BlockActionPacket, BlockBreakAnimationPacket, BlockChangePacket, BlockEntityDataPacket, BossBarPacket, CameraPacket, ChangeGameStatePacket, ChatMessagePacket, ChunkDataPacket, ClearTitlesPacket, CloseWindowPacket, CollectItemPacket, CraftRecipeResponse, DeathCombatEventPacket, DeclareCommandsPacket, DeclareRecipesPacket, DestroyEntitiesPacket, DisconnectPacket, DisplayScoreboardPacket, EffectPacket, EncryptionRequestPacket, EndCombatEventPacket, EnterCombatEventPacket, EntityAnimationPacket, EntityEffectPacket, EntityEquipmentPacket, EntityHeadLookPacket, EntityMetaDataPacket, EntityPositionAndRotationPacket, EntityPositionPacket, EntityPropertiesPacket, EntityRotationPacket, EntitySoundEffectPacket, EntityStatusPacket, EntityTeleportPacket, EntityVelocityPacket, ExplosionPacket, FacePlayerPacket, HeldItemChangePacket, InitializeWorldBorderPacket, JoinGamePacket, KeepAlivePacket, LoginDisconnectPacket, LoginPluginRequestPacket, LoginSuccessPacket, MapDataPacket, MultiBlockChangePacket, NamedSoundEffectPacket, NbtQueryResponsePacket, OpenBookPacket, OpenHorseWindowPacket, OpenSignEditorPacket, OpenWindowPacket, ParticlePacket, PingPacket, PlayerAbilitiesPacket, PlayerInfoPacket, PlayerListHeaderAndFooterPacket, PlayerPositionAndLookPacket, PluginMessagePacket, PongPacket, RemoveEntityEffectPacket, ResourcePackSendPacket, RespawnPacket, ResponsePacket, ScoreboardObjectivePacket, SculkVibrationSignal, SelectAdvancementTabPacket, ServerDifficultyPacket, SetCompressionPacket, SetCooldownPacket, SetExperiencePacket, SetPassengersPacket, SetSlotPacket, SetTitleSubTitlePacket, SetTitleTextPacket, SetTitleTimePacket, SoundEffectPacket, SpawnEntityPacket, SpawnExperienceOrbPacket, SpawnLivingEntityPacket, SpawnPaintingPacket, SpawnPlayerPacket, SpawnPositionPacket, StatisticsPacket, StopSoundPacket, TabCompletePacket, TagsPacket, TeamsPacket, TimeUpdatePacket, TradeListPacket, UnloadChunkPacket, UnlockRecipesPacket, UpdateHealthPacket, UpdateLightPacket, UpdateScorePacket, UpdateSimulationDistancePacket, UpdateViewDistancePacket, UpdateViewPositionPacket, VehicleMovePacket, WindowItemsPacket, WindowPropertyPacket, WorldBorderCenterPacket, WorldBorderLerpSizePacket, WorldBorderSizePacket, WorldBorderWarningDelayPacket, WorldBorderWarningReachPacket

public non-sealed interface ServerPacket extends Writeable, SendablePacket
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.

  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the id of this packet.

    Methods inherited from interface net.minestom.server.utils.binary.Writeable

    write
  • Method Details

    • getId

      int 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