Enum Class JoinMode

java.lang.Object
java.lang.Enum<JoinMode>
nl.pim16aap2.lightkeeper.protocol.JoinMode
All Implemented Interfaces:
Serializable, Comparable<JoinMode>, Constable

public enum JoinMode extends Enum<JoinMode>
Selects how a synthetic player is placed onto the server by CreatePlayer.Command.

Serialized on the wire by name, so the constant names are part of the protocol contract and must not be renamed without a RuntimeProtocol.VERSION bump.

  • Enum Constant Details

    • FULL_LOGIN

      public static final JoinMode FULL_LOGIN
      Drive the full vanilla login pipeline over a real loopback TCP connection.

      The join fires the real AsyncPlayerPreLoginEvent, PlayerLoginEvent, and PlayerJoinEvent, traverses the 1.20.2+ configuration phase, and lets the server derive the offline UUID from the player name. Because it is a genuine login, it can be denied by whitelist, ban, or a full server; such denials are surfaced as typed errors. The uuid field of CreatePlayer.Command must be null under this mode.

    • LEGACY_SPAWN

      public static final JoinMode LEGACY_SPAWN
      Spawn the synthetic player directly through the internal, reflective spawn path.

      This is the historical fast path: it fires PlayerJoinEvent but skips the pre-login, login, and configuration phases. The caller-supplied uuid is honored. Kept as an uncontracted internal shortcut for LightKeeper's own fast tests.

  • Method Details

    • values

      public static JoinMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JoinMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null