Record Class JoinGamePacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.JoinGamePacket
- All Implemented Interfaces:
NetworkBuffer.Writer
,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, String dimensionType, String world, long hashedSeed, GameMode gameMode, GameMode previousGameMode, boolean isDebug, boolean isFlat, DeathLocation deathLocation, int portalCooldown)
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
-
Constructor Summary
ConstructorDescriptionJoinGamePacket
(int entityId, boolean isHardcore, List<String> worlds, int maxPlayers, int viewDistance, int simulationDistance, boolean reducedDebugInfo, boolean enableRespawnScreen, boolean doLimitedCrafting, String dimensionType, String world, long hashedSeed, GameMode gameMode, GameMode previousGameMode, boolean isDebug, boolean isFlat, DeathLocation deathLocation, int portalCooldown) Creates an instance of aJoinGamePacket
record class.JoinGamePacket
(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeathLocation
record component.Returns the value of thedimensionType
record component.boolean
Returns the value of thedoLimitedCrafting
record component.boolean
Returns the value of theenableRespawnScreen
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
playId()
int
Returns the value of theportalCooldown
record component.Returns the value of thepreviousGameMode
record component.boolean
Returns the value of thereducedDebugInfo
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.void
write
(@NotNull NetworkBuffer writer) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minestom.server.network.packet.server.ServerPacket
getId
-
Field Details
-
MAX_WORLDS
public static final int MAX_WORLDS- See Also:
-
-
Constructor Details
-
JoinGamePacket
public JoinGamePacket(int entityId, boolean isHardcore, List<String> worlds, int maxPlayers, int viewDistance, int simulationDistance, boolean reducedDebugInfo, boolean enableRespawnScreen, boolean doLimitedCrafting, String dimensionType, String world, long hashedSeed, GameMode gameMode, GameMode previousGameMode, boolean isDebug, boolean isFlat, DeathLocation deathLocation, int portalCooldown) 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 component
-
JoinGamePacket
-
-
Method Details
-
write
- Specified by:
write
in interfaceNetworkBuffer.Writer
-
playId
public int playId()- Specified by:
playId
in interfaceServerPacket.Play
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
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
Returns the value of theworlds
record component.- Returns:
- the value of the
worlds
record component
-
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
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
-