Record Class NexoriPlayerAfkChangedEvent

java.lang.Object
java.lang.Record
io.github.hyjn.nexori.plugin.api.minigame.NexoriPlayerAfkChangedEvent
Record Components:
matchId - Nexori local match id.
queueId - queue id that produced the match, when known.
arenaId - arena id that owns the match, when known.
rulesEngineId - rules engine id that owns the match.
playerUuid - player whose AFK state changed.
playerName - player name known by Nexori at the transition point.
afk - true when the player became AFK; false when they became active.
changedAtEpochMs - transition timestamp.
idleMs - local idle duration at the transition point.
source - public source of the transition.

public record NexoriPlayerAfkChangedEvent(String matchId, String queueId, String arenaId, String rulesEngineId, UUID playerUuid, String playerName, boolean afk, long changedAtEpochMs, long idleMs, NexoriAfkActivitySource source) extends Record
Immutable public event for a Nexori local AFK state transition.

idleMs means the player idle duration at the transition point: for afk=true, how long the player had been inactive before becoming AFK; for afk=false, how long the player had been inactive before becoming active again.

  • Constructor Details

    • NexoriPlayerAfkChangedEvent

      public NexoriPlayerAfkChangedEvent(String matchId, String queueId, String arenaId, String rulesEngineId, UUID playerUuid, String playerName, boolean afk, long changedAtEpochMs, long idleMs, NexoriAfkActivitySource source)
      Creates an instance of a NexoriPlayerAfkChangedEvent record class.
      Parameters:
      matchId - the value for the matchId record component
      queueId - the value for the queueId record component
      arenaId - the value for the arenaId record component
      rulesEngineId - the value for the rulesEngineId record component
      playerUuid - the value for the playerUuid record component
      playerName - the value for the playerName record component
      afk - the value for the afk record component
      changedAtEpochMs - the value for the changedAtEpochMs record component
      idleMs - the value for the idleMs record component
      source - the value for the source 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.
    • matchId

      public String matchId()
      Returns the value of the matchId record component.
      Returns:
      the value of the matchId record component
    • queueId

      public String queueId()
      Returns the value of the queueId record component.
      Returns:
      the value of the queueId record component
    • arenaId

      public String arenaId()
      Returns the value of the arenaId record component.
      Returns:
      the value of the arenaId record component
    • rulesEngineId

      public String rulesEngineId()
      Returns the value of the rulesEngineId record component.
      Returns:
      the value of the rulesEngineId record component
    • playerUuid

      public UUID playerUuid()
      Returns the value of the playerUuid record component.
      Returns:
      the value of the playerUuid record component
    • playerName

      public String playerName()
      Returns the value of the playerName record component.
      Returns:
      the value of the playerName record component
    • afk

      public boolean afk()
      Returns the value of the afk record component.
      Returns:
      the value of the afk record component
    • changedAtEpochMs

      public long changedAtEpochMs()
      Returns the value of the changedAtEpochMs record component.
      Returns:
      the value of the changedAtEpochMs record component
    • idleMs

      public long idleMs()
      Returns the value of the idleMs record component.
      Returns:
      the value of the idleMs record component
    • source

      public NexoriAfkActivitySource source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component