Record Class NexoriSetPlayerAfkRequest
java.lang.Object
java.lang.Record
io.github.hyjn.nexori.plugin.api.minigame.NexoriSetPlayerAfkRequest
- Record Components:
matchId- Nexori local match id.playerUuid- player whose AFK state should change.afk-trueto mark AFK;falseto mark active.reason- short public reason for diagnostics.showHud- whether Nexori should show its AFK HUD when marking the player AFK.
public record NexoriSetPlayerAfkRequest(String matchId, UUID playerUuid, boolean afk, String reason, boolean showHud)
extends Record
Request to set the AFK state of one player inside one active match.
Nexori maintains a single public AFK state per player. If Nexori's built-in detection is still enabled for the match, player input can continue to change that same state. Minigames that want full control over AFK detection should disable the built-in policy first via the runtime AFK policy APIs, then use this request to report AFK state from their own logic.
showHud controls whether the Nexori AFK HUD is shown to the player when
afk=true. Set to false when the minigame handles its own AFK feedback
and the Nexori overlay would be redundant or unwanted. Defaults to true.
-
Constructor Summary
ConstructorsConstructorDescriptionNexoriSetPlayerAfkRequest(String matchId, UUID playerUuid, boolean afk, String reason) Convenience constructor —showHuddefaults totrue.NexoriSetPlayerAfkRequest(String matchId, UUID playerUuid, boolean afk, String reason, boolean showHud) Creates an instance of aNexoriSetPlayerAfkRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanafk()Returns the value of theafkrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.matchId()Returns the value of thematchIdrecord component.Returns the value of theplayerUuidrecord component.reason()Returns the value of thereasonrecord component.booleanshowHud()Returns the value of theshowHudrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NexoriSetPlayerAfkRequest
-
NexoriSetPlayerAfkRequest
public NexoriSetPlayerAfkRequest(String matchId, UUID playerUuid, boolean afk, String reason, boolean showHud) Creates an instance of aNexoriSetPlayerAfkRequestrecord class.- Parameters:
matchId- the value for thematchIdrecord componentplayerUuid- the value for theplayerUuidrecord componentafk- the value for theafkrecord componentreason- the value for thereasonrecord componentshowHud- the value for theshowHudrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
matchId
-
playerUuid
Returns the value of theplayerUuidrecord component.- Returns:
- the value of the
playerUuidrecord component
-
afk
-
reason
-
showHud
-