Record Class RespawnPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.RespawnPacket
- All Implemented Interfaces:
NetworkBuffer.Writer
,SendablePacket
,ServerPacket
,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
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionRespawnPacket
(String dimensionType, String worldName, long hashedSeed, GameMode gameMode, GameMode previousGameMode, boolean isDebug, boolean isFlat, WorldPos deathLocation, int portalCooldown, int copyData) Creates an instance of aRespawnPacket
record class.RespawnPacket
(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescriptionint
copyData()
Returns the value of thecopyData
record component.Returns the value of thedeathLocation
record component.Returns the value of thedimensionType
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.int
playId()
int
Returns the value of theportalCooldown
record component.Returns the value of thepreviousGameMode
record component.final String
toString()
Returns a string representation of this record class.Returns the value of theworldName
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
-
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:
-
-
Constructor Details
-
RespawnPacket
-
RespawnPacket
public RespawnPacket(String dimensionType, String worldName, long hashedSeed, GameMode gameMode, GameMode previousGameMode, boolean isDebug, boolean isFlat, WorldPos deathLocation, int portalCooldown, int copyData) Creates an instance of aRespawnPacket
record class.- Parameters:
dimensionType
- the value for thedimensionType
record componentworldName
- the value for theworldName
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 componentcopyData
- the value for thecopyData
record component
-
-
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 '=='. -
dimensionType
Returns the value of thedimensionType
record component.- Returns:
- the value of the
dimensionType
record component
-
worldName
Returns the value of theworldName
record component.- Returns:
- the value of the
worldName
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
-
copyData
public int copyData()Returns the value of thecopyData
record component.- Returns:
- the value of the
copyData
record component
-