Record Class JoinGamePacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.JoinGamePacket
- All Implemented Interfaces:
Packet, 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, PlayerSpawnInfo playerSpawnInfo, boolean onlineMode, boolean enforcesSecureChat)
extends Record
implements ServerPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Handshake, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic 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, PlayerSpawnInfo playerSpawnInfo, boolean onlineMode, boolean enforcesSecureChat) Creates an instance of aJoinGamePacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thedoLimitedCraftingrecord component.booleanReturns the value of theenableRespawnScreenrecord component.booleanReturns the value of theenforcesSecureChatrecord component.intentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisHardcorerecord component.intReturns the value of themaxPlayersrecord component.booleanReturns the value of theonlineModerecord component.Returns the value of theplayerSpawnInforecord component.booleanReturns the value of thereducedDebugInforecord component.intReturns the value of thesimulationDistancerecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theviewDistancerecord component.worlds()Returns the value of theworldsrecord 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, PlayerSpawnInfo playerSpawnInfo, boolean onlineMode, boolean enforcesSecureChat) Creates an instance of aJoinGamePacketrecord class.- Parameters:
entityId- the value for theentityIdrecord componentisHardcore- the value for theisHardcorerecord componentworlds- the value for theworldsrecord componentmaxPlayers- the value for themaxPlayersrecord componentviewDistance- the value for theviewDistancerecord componentsimulationDistance- the value for thesimulationDistancerecord componentreducedDebugInfo- the value for thereducedDebugInforecord componentenableRespawnScreen- the value for theenableRespawnScreenrecord componentdoLimitedCrafting- the value for thedoLimitedCraftingrecord componentplayerSpawnInfo- the value for theplayerSpawnInforecord componentonlineMode- the value for theonlineModerecord componentenforcesSecureChat- the value for theenforcesSecureChatrecord 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 thecomparemethod from their corresponding wrapper classes. -
entityId
public int entityId()Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
isHardcore
public boolean isHardcore()Returns the value of theisHardcorerecord component.- Returns:
- the value of the
isHardcorerecord component
-
worlds
-
maxPlayers
public int maxPlayers()Returns the value of themaxPlayersrecord component.- Returns:
- the value of the
maxPlayersrecord component
-
viewDistance
public int viewDistance()Returns the value of theviewDistancerecord component.- Returns:
- the value of the
viewDistancerecord component
-
simulationDistance
public int simulationDistance()Returns the value of thesimulationDistancerecord component.- Returns:
- the value of the
simulationDistancerecord component
-
reducedDebugInfo
public boolean reducedDebugInfo()Returns the value of thereducedDebugInforecord component.- Returns:
- the value of the
reducedDebugInforecord component
-
enableRespawnScreen
public boolean enableRespawnScreen()Returns the value of theenableRespawnScreenrecord component.- Returns:
- the value of the
enableRespawnScreenrecord component
-
doLimitedCrafting
public boolean doLimitedCrafting()Returns the value of thedoLimitedCraftingrecord component.- Returns:
- the value of the
doLimitedCraftingrecord component
-
playerSpawnInfo
Returns the value of theplayerSpawnInforecord component.- Returns:
- the value of the
playerSpawnInforecord component
-
onlineMode
public boolean onlineMode()Returns the value of theonlineModerecord component.- Returns:
- the value of the
onlineModerecord component
-
enforcesSecureChat
public boolean enforcesSecureChat()Returns the value of theenforcesSecureChatrecord component.- Returns:
- the value of the
enforcesSecureChatrecord component
-