Class JoinGamePacket

java.lang.Object
net.minestom.server.network.packet.server.play.JoinGamePacket
All Implemented Interfaces:
SendablePacket, ServerPacket, Readable, Writeable

public class JoinGamePacket extends Object implements ServerPacket
  • Field Details

    • entityId

      public int entityId
    • hardcore

      public boolean hardcore
    • gameMode

      public GameMode gameMode
    • previousGameMode

      public GameMode previousGameMode
    • dimensionType

      public DimensionType dimensionType
    • hashedSeed

      public long hashedSeed
    • maxPlayers

      public int maxPlayers
    • viewDistance

      public int viewDistance
    • reducedDebugInfo

      public boolean reducedDebugInfo
    • enableRespawnScreen

      public boolean enableRespawnScreen
    • isDebug

      public boolean isDebug
    • isFlat

      public boolean isFlat
  • Constructor Details

    • JoinGamePacket

      public JoinGamePacket()
  • Method Details

    • write

      public void write(@NotNull @NotNull BinaryWriter writer)
      Description copied from interface: Writeable
      Writes into a BinaryWriter.
      Specified by:
      write in interface Writeable
      Parameters:
      writer - the writer to write to
    • read

      public void read(@NotNull @NotNull BinaryReader reader)
      Description copied from interface: Readable
      Reads from a BinaryReader.
      Specified by:
      read in interface Readable
      Specified by:
      read in interface ServerPacket
      Parameters:
      reader - the reader to read from
    • getId

      public int getId()
      Description copied from interface: ServerPacket
      Gets the id of this packet.

      Written in the final buffer header so it needs to match the client id.

      Specified by:
      getId in interface ServerPacket
      Returns:
      the id of this packet