Record Class CreatePlayer.Command

java.lang.Object
java.lang.Record
nl.pim16aap2.lightkeeper.protocol.CreatePlayer.Command
Record Components:
requestId - Correlation identifier matching the response's requestId.
name - Display name of the synthetic player.
uuid - Unique identifier assigned to the player under JoinMode.LEGACY_SPAWN; must be null under JoinMode.FULL_LOGIN, where the server derives the offline UUID from name.
worldName - Name of the world in which the player is spawned.
x - Spawn X coordinate, or null to use the world spawn.
y - Spawn Y coordinate, or null to use the world spawn.
z - Spawn Z coordinate, or null to use the world spawn.
health - Starting health value, or null to use the server default.
permissionsCsv - Comma-separated list of permission nodes to grant, or null for 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 under JoinMode.FULL_LOGIN, or null for the server default. Ignored under JoinMode.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 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 a Command record class.
      Parameters:
      requestId - the value for the requestId record component
      name - the value for the name record component
      uuid - the value for the uuid record component
      worldName - the value for the worldName record component
      x - the value for the x record component
      y - the value for the y record component
      z - the value for the z record component
      health - the value for the health record component
      permissionsCsv - the value for the permissionsCsv record component
      invulnerable - the value for the invulnerable record component
      joinMode - the value for the joinMode record component
      locale - the value for the locale record component
  • Method Details

    • responseType

      public Class<CreatePlayer.Response> responseType()
      Description copied from interface: IAgentCommand
      Returns the concrete response class for this command, used by the client to deserialize typed responses.
      Specified by:
      responseType in interface IAgentCommand<CreatePlayer.Response>
      Returns:
      Non-null response class token.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • requestId

      public String requestId()
      Returns the value of the requestId record component.
      Specified by:
      requestId in interface IAgentCommand<CreatePlayer.Response>
      Returns:
      the value of the requestId record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • uuid

      public @Nullable UUID uuid()
      Returns the value of the uuid record component.
      Returns:
      the value of the uuid record component
    • worldName

      public String worldName()
      Returns the value of the worldName record component.
      Returns:
      the value of the worldName record component
    • x

      public @Nullable Double x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public @Nullable Double y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component
    • z

      public @Nullable Double z()
      Returns the value of the z record component.
      Returns:
      the value of the z record component
    • health

      public @Nullable Double health()
      Returns the value of the health record component.
      Returns:
      the value of the health record component
    • permissionsCsv

      public @Nullable String permissionsCsv()
      Returns the value of the permissionsCsv record component.
      Returns:
      the value of the permissionsCsv record component
    • invulnerable

      public boolean invulnerable()
      Returns the value of the invulnerable record component.
      Returns:
      the value of the invulnerable record component
    • joinMode

      public JoinMode joinMode()
      Returns the value of the joinMode record component.
      Returns:
      the value of the joinMode record component
    • locale

      public @Nullable String locale()
      Returns the value of the locale record component.
      Returns:
      the value of the locale record component