Record Class PlayerSpawnInfo
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.data.PlayerSpawnInfo
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeathLocationrecord component.booleandebug()Returns the value of thedebugrecord component.intReturns the value of thedimensionTyperecord component.final booleanIndicates whether some other object is "equal to" this one.booleanflat()Returns the value of theflatrecord component.gameMode()Returns the value of thegameModerecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of thehashedSeedrecord 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.world()Returns the value of theworldrecord component.
-
Field Details
-
NETWORK_TYPE
-
-
Constructor Details
-
PlayerSpawnInfo
public PlayerSpawnInfo(int dimensionType, String world, long hashedSeed, GameMode gameMode, @Nullable @Nullable GameMode previousGameMode, boolean debug, boolean flat, @Nullable @Nullable WorldPos deathLocation, int portalCooldown, int seaLevel) Creates an instance of aPlayerSpawnInforecord class.- Parameters:
dimensionType- the value for thedimensionTyperecord componentworld- the value for theworldrecord componenthashedSeed- the value for thehashedSeedrecord componentgameMode- the value for thegameModerecord componentpreviousGameMode- the value for thepreviousGameModerecord componentdebug- the value for thedebugrecord componentflat- the value for theflatrecord componentdeathLocation- the value for thedeathLocationrecord componentportalCooldown- the value for theportalCooldownrecord componentseaLevel- the value for theseaLevelrecord 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
-
world
Returns the value of theworldrecord component.- Returns:
- the value of the
worldrecord 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
-
debug
public boolean debug()Returns the value of thedebugrecord component.- Returns:
- the value of the
debugrecord component
-
flat
public boolean flat()Returns the value of theflatrecord component.- Returns:
- the value of the
flatrecord 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
-