Record Class CreatePlayer.Command
java.lang.Object
java.lang.Record
nl.pim16aap2.lightkeeper.protocol.CreatePlayer.Command
- Record Components:
requestId- Correlation identifier matching the response'srequestId.name- Display name of the synthetic player.uuid- Unique identifier assigned to the player underJoinMode.LEGACY_SPAWN; must benullunderJoinMode.FULL_LOGIN, where the server derives the offline UUID fromname.worldName- Name of the world in which the player is spawned.x- Spawn X coordinate, ornullto use the world spawn.y- Spawn Y coordinate, ornullto use the world spawn.z- Spawn Z coordinate, ornullto use the world spawn.health- Starting health value, ornullto use the server default.permissionsCsv- Comma-separated list of permission nodes to grant, ornullfor none.invulnerable- Whether the synthetic player is protected from ordinary damage.joinMode- How the player joins the server: the full login pipeline or the internal legacy spawn.locale- Client locale (e.g."en_us") sent during the configuration phase underJoinMode.FULL_LOGIN, ornullfor the server default. Ignored underJoinMode.LEGACY_SPAWN.
- All Implemented Interfaces:
IAgentCommand<CreatePlayer.Response>
- Enclosing class:
CreatePlayer
public static record CreatePlayer.Command(String requestId, String name, @Nullable UUID uuid, String worldName, @Nullable Double x, @Nullable Double y, @Nullable Double z, @Nullable Double health, @Nullable String permissionsCsv, boolean invulnerable, JoinMode joinMode, @Nullable String locale)
extends Record
implements IAgentCommand<CreatePlayer.Response>
Command record for
CREATE_PLAYER.-
Constructor Summary
ConstructorsConstructorDescriptionCommand(String requestId, String name, @Nullable UUID uuid, String worldName, @Nullable Double x, @Nullable Double y, @Nullable Double z, @Nullable Double health, @Nullable String permissionsCsv, boolean invulnerable, JoinMode joinMode, @Nullable String locale) Creates an instance of aCommandrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Doublehealth()Returns the value of thehealthrecord component.booleanReturns the value of theinvulnerablerecord component.joinMode()Returns the value of thejoinModerecord component.@Nullable Stringlocale()Returns the value of thelocalerecord component.name()Returns the value of thenamerecord component.@Nullable StringReturns the value of thepermissionsCsvrecord component.Returns the value of therequestIdrecord component.Returns the concrete response class for this command, used by the client to deserialize typed responses.final StringtoString()Returns a string representation of this record class.@Nullable UUIDuuid()Returns the value of theuuidrecord component.Returns the value of theworldNamerecord component.@Nullable Doublex()Returns the value of thexrecord component.@Nullable Doubley()Returns the value of theyrecord component.@Nullable Doublez()Returns the value of thezrecord component.
-
Constructor Details
-
Command
public Command(String requestId, String name, @Nullable UUID uuid, String worldName, @Nullable Double x, @Nullable Double y, @Nullable Double z, @Nullable Double health, @Nullable String permissionsCsv, boolean invulnerable, JoinMode joinMode, @Nullable String locale) Creates an instance of aCommandrecord class.- Parameters:
requestId- the value for therequestIdrecord componentname- the value for thenamerecord componentuuid- the value for theuuidrecord componentworldName- the value for theworldNamerecord componentx- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componenthealth- the value for thehealthrecord componentpermissionsCsv- the value for thepermissionsCsvrecord componentinvulnerable- the value for theinvulnerablerecord componentjoinMode- the value for thejoinModerecord componentlocale- the value for thelocalerecord component
-
-
Method Details
-
responseType
Description copied from interface:IAgentCommandReturns the concrete response class for this command, used by the client to deserialize typed responses.- Specified by:
responseTypein interfaceIAgentCommand<CreatePlayer.Response>- Returns:
- Non-null response class token.
-
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 '=='. -
requestId
Returns the value of therequestIdrecord component.- Specified by:
requestIdin interfaceIAgentCommand<CreatePlayer.Response>- Returns:
- the value of the
requestIdrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
uuid
Returns the value of theuuidrecord component.- Returns:
- the value of the
uuidrecord component
-
worldName
Returns the value of theworldNamerecord component.- Returns:
- the value of the
worldNamerecord component
-
x
Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
health
Returns the value of thehealthrecord component.- Returns:
- the value of the
healthrecord component
-
permissionsCsv
Returns the value of thepermissionsCsvrecord component.- Returns:
- the value of the
permissionsCsvrecord component
-
invulnerable
public boolean invulnerable()Returns the value of theinvulnerablerecord component.- Returns:
- the value of the
invulnerablerecord component
-
joinMode
Returns the value of thejoinModerecord component.- Returns:
- the value of the
joinModerecord component
-
locale
Returns the value of thelocalerecord component.- Returns:
- the value of the
localerecord component
-