Record Class RespawnPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.RespawnPacket
- All Implemented Interfaces:
SendablePacket,ServerPacket,ServerPacket.Play
public record RespawnPacket(int dimensionType, @NotNull String worldName, long hashedSeed, @NotNull GameMode gameMode, @NotNull GameMode previousGameMode, boolean isDebug, boolean isFlat, @Nullable WorldPos deathLocation, int portalCooldown, byte copyData, int seaLevel)
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 intstatic final intstatic final intstatic final intstatic final NetworkBuffer.Type<RespawnPacket> -
Constructor Summary
ConstructorsConstructorDescriptionRespawnPacket(int dimensionType, @NotNull String worldName, long hashedSeed, @NotNull GameMode gameMode, @NotNull GameMode previousGameMode, boolean isDebug, boolean isFlat, @Nullable WorldPos deathLocation, int portalCooldown, byte copyData, int seaLevel) Creates an instance of aRespawnPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbytecopyData()Returns the value of thecopyDatarecord component.@Nullable WorldPosReturns the value of thedeathLocationrecord component.intReturns the value of thedimensionTyperecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull GameModegameMode()Returns the value of thegameModerecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of thehashedSeedrecord component.booleanisDebug()Returns the value of theisDebugrecord component.booleanisFlat()Returns the value of theisFlatrecord component.intReturns the value of theportalCooldownrecord component.@NotNull GameModeReturns the value of thepreviousGameModerecord component.intseaLevel()Returns the value of theseaLevelrecord component.final StringtoString()Returns a string representation of this record class.@NotNull StringReturns the value of theworldNamerecord component.
-
Field Details
-
COPY_NONE
public static final int COPY_NONE- See Also:
-
COPY_ATTRIBUTES
public static final int COPY_ATTRIBUTES- See Also:
-
COPY_METADATA
public static final int COPY_METADATA- See Also:
-
COPY_ALL
public static final int COPY_ALL- See Also:
-
SERIALIZER
-
-
Constructor Details
-
RespawnPacket
public RespawnPacket(int dimensionType, @NotNull @NotNull String worldName, long hashedSeed, @NotNull @NotNull GameMode gameMode, @NotNull @NotNull GameMode previousGameMode, boolean isDebug, boolean isFlat, @Nullable @Nullable WorldPos deathLocation, int portalCooldown, byte copyData, int seaLevel) Creates an instance of aRespawnPacketrecord class.- Parameters:
dimensionType- the value for thedimensionTyperecord componentworldName- the value for theworldNamerecord componenthashedSeed- the value for thehashedSeedrecord componentgameMode- the value for thegameModerecord componentpreviousGameMode- the value for thepreviousGameModerecord componentisDebug- the value for theisDebugrecord componentisFlat- the value for theisFlatrecord componentdeathLocation- the value for thedeathLocationrecord componentportalCooldown- the value for theportalCooldownrecord componentcopyData- the value for thecopyDatarecord componentseaLevel- the value for theseaLevelrecord component
-
-
Method Details
-
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 '=='. -
dimensionType
public int dimensionType()Returns the value of thedimensionTyperecord component.- Returns:
- the value of the
dimensionTyperecord component
-
worldName
Returns the value of theworldNamerecord component.- Returns:
- the value of the
worldNamerecord component
-
hashedSeed
public long hashedSeed()Returns the value of thehashedSeedrecord component.- Returns:
- the value of the
hashedSeedrecord component
-
gameMode
Returns the value of thegameModerecord component.- Returns:
- the value of the
gameModerecord component
-
previousGameMode
Returns the value of thepreviousGameModerecord component.- Returns:
- the value of the
previousGameModerecord component
-
isDebug
public boolean isDebug()Returns the value of theisDebugrecord component.- Returns:
- the value of the
isDebugrecord component
-
isFlat
public boolean isFlat()Returns the value of theisFlatrecord component.- Returns:
- the value of the
isFlatrecord component
-
deathLocation
Returns the value of thedeathLocationrecord component.- Returns:
- the value of the
deathLocationrecord component
-
portalCooldown
public int portalCooldown()Returns the value of theportalCooldownrecord component.- Returns:
- the value of the
portalCooldownrecord component
-
copyData
public byte copyData()Returns the value of thecopyDatarecord component.- Returns:
- the value of the
copyDatarecord component
-
seaLevel
public int seaLevel()Returns the value of theseaLevelrecord component.- Returns:
- the value of the
seaLevelrecord component
-