Record Class RespawnPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.RespawnPacket
- All Implemented Interfaces:
SendablePacket, ServerPacket, ServerPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface 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, String worldName, long hashedSeed, GameMode gameMode, GameMode previousGameMode, boolean isDebug, boolean isFlat, @Nullable WorldPos deathLocation, int portalCooldown, int seaLevel, byte copyData) Creates an instance of aRespawnPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbytecopyData()Returns the value of thecopyDatarecord component.Returns the value of thedeathLocationrecord component.intReturns the value of thedimensionTyperecord component.final booleanIndicates whether some other object is "equal to" this one.gameMode()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.Returns the value of thepreviousGameModerecord component.intseaLevel()Returns the value of theseaLevelrecord component.final StringtoString()Returns a string representation of this record class.Returns 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, String worldName, long hashedSeed, GameMode gameMode, GameMode previousGameMode, boolean isDebug, boolean isFlat, @Nullable @Nullable WorldPos deathLocation, int portalCooldown, int seaLevel, byte copyData) 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 componentseaLevel- the value for theseaLevelrecord componentcopyData- the value for thecopyDatarecord 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. -
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
-
portalCooldown
public int portalCooldown()Returns the value of theportalCooldownrecord component.- Returns:
- the value of the
portalCooldownrecord component
-
seaLevel
public int seaLevel()Returns the value of theseaLevelrecord component.- Returns:
- the value of the
seaLevelrecord component
-
copyData
public byte copyData()Returns the value of thecopyDatarecord component.- Returns:
- the value of the
copyDatarecord component
-