Record Class NexoriMatchPlacementState

java.lang.Object
java.lang.Record
io.github.hyjn.nexori.plugin.api.minigame.NexoriMatchPlacementState
Record Components:
expectedPlayers - expected initial players.
arrivedPlayers - expected players that arrived at the arena runtime.
placedPlayers - expected players with confirmed or fallback placement.
placementComplete - whether every expected initial player has placement recorded.
minimumInitialPlayers - minimum placed player count required to open the start gate.
initialPlacementWindowOpen - whether the initial placement window is still open.
initialPlacementWindowStartedAtEpochMs - placement window start timestamp, or 0.
initialPlacementWindowExpiresAtEpochMs - placement window expiry timestamp, or 0.
initialPlacementWindowClosedAtEpochMs - placement window close timestamp, or 0.
initialPlacementWindowCloseReason - public reason the placement window closed.
startGateOpen - whether rules mods may start normal gameplay.
startGateOpenedAtEpochMs - start gate open timestamp, or 0.
startGateOpenReason - public reason the start gate opened.

public record NexoriMatchPlacementState(int expectedPlayers, int arrivedPlayers, int placedPlayers, boolean placementComplete, int minimumInitialPlayers, boolean initialPlacementWindowOpen, long initialPlacementWindowStartedAtEpochMs, long initialPlacementWindowExpiresAtEpochMs, long initialPlacementWindowClosedAtEpochMs, String initialPlacementWindowCloseReason, boolean startGateOpen, long startGateOpenedAtEpochMs, String startGateOpenReason) extends Record
Public snapshot of Nexori's initial placement and start-gate state for one active match.

placementComplete means every expected initial player was placed. startGateOpen means gameplay may start; that can happen with a partial initial roster after the configured placement window expires and minimumInitialPlayers has been met.

  • Constructor Details

    • NexoriMatchPlacementState

      public NexoriMatchPlacementState(int expectedPlayers, int arrivedPlayers, int placedPlayers, boolean placementComplete)
    • NexoriMatchPlacementState

      public NexoriMatchPlacementState(int expectedPlayers, int arrivedPlayers, int placedPlayers, boolean placementComplete, int minimumInitialPlayers, boolean initialPlacementWindowOpen, long initialPlacementWindowStartedAtEpochMs, long initialPlacementWindowExpiresAtEpochMs, long initialPlacementWindowClosedAtEpochMs, String initialPlacementWindowCloseReason, boolean startGateOpen, long startGateOpenedAtEpochMs, String startGateOpenReason)
      Creates an instance of a NexoriMatchPlacementState record class.
      Parameters:
      expectedPlayers - the value for the expectedPlayers record component
      arrivedPlayers - the value for the arrivedPlayers record component
      placedPlayers - the value for the placedPlayers record component
      placementComplete - the value for the placementComplete record component
      minimumInitialPlayers - the value for the minimumInitialPlayers record component
      initialPlacementWindowOpen - the value for the initialPlacementWindowOpen record component
      initialPlacementWindowStartedAtEpochMs - the value for the initialPlacementWindowStartedAtEpochMs record component
      initialPlacementWindowExpiresAtEpochMs - the value for the initialPlacementWindowExpiresAtEpochMs record component
      initialPlacementWindowClosedAtEpochMs - the value for the initialPlacementWindowClosedAtEpochMs record component
      initialPlacementWindowCloseReason - the value for the initialPlacementWindowCloseReason record component
      startGateOpen - the value for the startGateOpen record component
      startGateOpenedAtEpochMs - the value for the startGateOpenedAtEpochMs record component
      startGateOpenReason - the value for the startGateOpenReason record component
  • Method Details

    • 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 the compare method from their corresponding wrapper classes.
      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.
    • expectedPlayers

      public int expectedPlayers()
      Returns the value of the expectedPlayers record component.
      Returns:
      the value of the expectedPlayers record component
    • arrivedPlayers

      public int arrivedPlayers()
      Returns the value of the arrivedPlayers record component.
      Returns:
      the value of the arrivedPlayers record component
    • placedPlayers

      public int placedPlayers()
      Returns the value of the placedPlayers record component.
      Returns:
      the value of the placedPlayers record component
    • placementComplete

      public boolean placementComplete()
      Returns the value of the placementComplete record component.
      Returns:
      the value of the placementComplete record component
    • minimumInitialPlayers

      public int minimumInitialPlayers()
      Returns the value of the minimumInitialPlayers record component.
      Returns:
      the value of the minimumInitialPlayers record component
    • initialPlacementWindowOpen

      public boolean initialPlacementWindowOpen()
      Returns the value of the initialPlacementWindowOpen record component.
      Returns:
      the value of the initialPlacementWindowOpen record component
    • initialPlacementWindowStartedAtEpochMs

      public long initialPlacementWindowStartedAtEpochMs()
      Returns the value of the initialPlacementWindowStartedAtEpochMs record component.
      Returns:
      the value of the initialPlacementWindowStartedAtEpochMs record component
    • initialPlacementWindowExpiresAtEpochMs

      public long initialPlacementWindowExpiresAtEpochMs()
      Returns the value of the initialPlacementWindowExpiresAtEpochMs record component.
      Returns:
      the value of the initialPlacementWindowExpiresAtEpochMs record component
    • initialPlacementWindowClosedAtEpochMs

      public long initialPlacementWindowClosedAtEpochMs()
      Returns the value of the initialPlacementWindowClosedAtEpochMs record component.
      Returns:
      the value of the initialPlacementWindowClosedAtEpochMs record component
    • initialPlacementWindowCloseReason

      public String initialPlacementWindowCloseReason()
      Returns the value of the initialPlacementWindowCloseReason record component.
      Returns:
      the value of the initialPlacementWindowCloseReason record component
    • startGateOpen

      public boolean startGateOpen()
      Returns the value of the startGateOpen record component.
      Returns:
      the value of the startGateOpen record component
    • startGateOpenedAtEpochMs

      public long startGateOpenedAtEpochMs()
      Returns the value of the startGateOpenedAtEpochMs record component.
      Returns:
      the value of the startGateOpenedAtEpochMs record component
    • startGateOpenReason

      public String startGateOpenReason()
      Returns the value of the startGateOpenReason record component.
      Returns:
      the value of the startGateOpenReason record component