Record Class JoinGamePacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.JoinGamePacket
- All Implemented Interfaces:
SendablePacket
,ServerPacket
,ServerPacket.Play
public record JoinGamePacket(int entityId, boolean isHardcore, List<String> worlds, int maxPlayers, int viewDistance, int simulationDistance, boolean reducedDebugInfo, boolean enableRespawnScreen, boolean doLimitedCrafting, int dimensionType, String world, long hashedSeed, GameMode gameMode, GameMode previousGameMode, boolean isDebug, boolean isFlat, @Nullable WorldPos deathLocation, int portalCooldown, int seaLevel, boolean enforcesSecureChat)
extends Record
implements ServerPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.network.packet.server.ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final NetworkBuffer.Type
<JoinGamePacket> -
Constructor Summary
ConstructorsConstructorDescriptionJoinGamePacket
(int entityId, boolean isHardcore, List<String> worlds, int maxPlayers, int viewDistance, int simulationDistance, boolean reducedDebugInfo, boolean enableRespawnScreen, boolean doLimitedCrafting, int dimensionType, String world, long hashedSeed, GameMode gameMode, GameMode previousGameMode, boolean isDebug, boolean isFlat, @Nullable WorldPos deathLocation, int portalCooldown, int seaLevel, boolean enforcesSecureChat) Creates an instance of aJoinGamePacket
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable WorldPos
Returns the value of thedeathLocation
record component.int
Returns the value of thedimensionType
record component.boolean
Returns the value of thedoLimitedCrafting
record component.boolean
Returns the value of theenableRespawnScreen
record component.boolean
Returns the value of theenforcesSecureChat
record component.int
entityId()
Returns the value of theentityId
record component.final boolean
Indicates whether some other object is "equal to" this one.gameMode()
Returns the value of thegameMode
record component.final int
hashCode()
Returns a hash code value for this object.long
Returns the value of thehashedSeed
record component.boolean
isDebug()
Returns the value of theisDebug
record component.boolean
isFlat()
Returns the value of theisFlat
record component.boolean
Returns the value of theisHardcore
record component.int
Returns the value of themaxPlayers
record component.int
Returns the value of theportalCooldown
record component.Returns the value of thepreviousGameMode
record component.boolean
Returns the value of thereducedDebugInfo
record component.int
seaLevel()
Returns the value of theseaLevel
record component.int
Returns the value of thesimulationDistance
record component.final String
toString()
Returns a string representation of this record class.int
Returns the value of theviewDistance
record component.world()
Returns the value of theworld
record component.worlds()
Returns the value of theworlds
record component.
-
Field Details
-
MAX_WORLDS
public static final int MAX_WORLDS- See Also:
-
SERIALIZER
-
-
Constructor Details
-
JoinGamePacket
public JoinGamePacket(int entityId, boolean isHardcore, List<String> worlds, int maxPlayers, int viewDistance, int simulationDistance, boolean reducedDebugInfo, boolean enableRespawnScreen, boolean doLimitedCrafting, int dimensionType, String world, long hashedSeed, GameMode gameMode, GameMode previousGameMode, boolean isDebug, boolean isFlat, @Nullable @Nullable WorldPos deathLocation, int portalCooldown, int seaLevel, boolean enforcesSecureChat) Creates an instance of aJoinGamePacket
record class.- Parameters:
entityId
- the value for theentityId
record componentisHardcore
- the value for theisHardcore
record componentworlds
- the value for theworlds
record componentmaxPlayers
- the value for themaxPlayers
record componentviewDistance
- the value for theviewDistance
record componentsimulationDistance
- the value for thesimulationDistance
record componentreducedDebugInfo
- the value for thereducedDebugInfo
record componentenableRespawnScreen
- the value for theenableRespawnScreen
record componentdoLimitedCrafting
- the value for thedoLimitedCrafting
record componentdimensionType
- the value for thedimensionType
record componentworld
- the value for theworld
record componenthashedSeed
- the value for thehashedSeed
record componentgameMode
- the value for thegameMode
record componentpreviousGameMode
- the value for thepreviousGameMode
record componentisDebug
- the value for theisDebug
record componentisFlat
- the value for theisFlat
record componentdeathLocation
- the value for thedeathLocation
record componentportalCooldown
- the value for theportalCooldown
record componentseaLevel
- the value for theseaLevel
record componentenforcesSecureChat
- the value for theenforcesSecureChat
record component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
entityId
public int entityId()Returns the value of theentityId
record component.- Returns:
- the value of the
entityId
record component
-
isHardcore
public boolean isHardcore()Returns the value of theisHardcore
record component.- Returns:
- the value of the
isHardcore
record component
-
worlds
-
maxPlayers
public int maxPlayers()Returns the value of themaxPlayers
record component.- Returns:
- the value of the
maxPlayers
record component
-
viewDistance
public int viewDistance()Returns the value of theviewDistance
record component.- Returns:
- the value of the
viewDistance
record component
-
simulationDistance
public int simulationDistance()Returns the value of thesimulationDistance
record component.- Returns:
- the value of the
simulationDistance
record component
-
reducedDebugInfo
public boolean reducedDebugInfo()Returns the value of thereducedDebugInfo
record component.- Returns:
- the value of the
reducedDebugInfo
record component
-
enableRespawnScreen
public boolean enableRespawnScreen()Returns the value of theenableRespawnScreen
record component.- Returns:
- the value of the
enableRespawnScreen
record component
-
doLimitedCrafting
public boolean doLimitedCrafting()Returns the value of thedoLimitedCrafting
record component.- Returns:
- the value of the
doLimitedCrafting
record component
-
dimensionType
public int dimensionType()Returns the value of thedimensionType
record component.- Returns:
- the value of the
dimensionType
record component
-
world
Returns the value of theworld
record component.- Returns:
- the value of the
world
record component
-
hashedSeed
public long hashedSeed()Returns the value of thehashedSeed
record component.- Returns:
- the value of the
hashedSeed
record component
-
gameMode
Returns the value of thegameMode
record component.- Returns:
- the value of the
gameMode
record component
-
previousGameMode
Returns the value of thepreviousGameMode
record component.- Returns:
- the value of the
previousGameMode
record component
-
isDebug
public boolean isDebug()Returns the value of theisDebug
record component.- Returns:
- the value of the
isDebug
record component
-
isFlat
public boolean isFlat()Returns the value of theisFlat
record component.- Returns:
- the value of the
isFlat
record component
-
deathLocation
Returns the value of thedeathLocation
record component.- Returns:
- the value of the
deathLocation
record component
-
portalCooldown
public int portalCooldown()Returns the value of theportalCooldown
record component.- Returns:
- the value of the
portalCooldown
record component
-
seaLevel
public int seaLevel()Returns the value of theseaLevel
record component.- Returns:
- the value of the
seaLevel
record component
-
enforcesSecureChat
public boolean enforcesSecureChat()Returns the value of theenforcesSecureChat
record component.- Returns:
- the value of the
enforcesSecureChat
record component
-