Package dev.itsharshxd.zentrix.api.party
Record Class PartyInvitation
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.party.PartyInvitation
- Record Components:
inviterId- the party leader who sent itinviteeId- the invited playerpartyId- the party the invitee would joinexpiresAt- when it expires, in epoch milliseconds
public record PartyInvitation(@NotNull UUID inviterId, @NotNull UUID inviteeId, @NotNull UUID partyId, long expiresAt)
extends Record
A pending party invitation. A snapshot: accepting, denying or expiring it does not change it.
- Since:
- 1.8.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPartyInvitation(@NotNull UUID inviterId, @NotNull UUID inviteeId, @NotNull UUID partyId, long expiresAt) Creates an instance of aPartyInvitationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexpiresAtrecord component.final inthashCode()Returns a hash code value for this object.@NotNull UUIDReturns the value of theinviteeIdrecord component.@NotNull UUIDReturns the value of theinviterIdrecord component.booleanWhether it has expired by now.@NotNull UUIDpartyId()Returns the value of thepartyIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
isExpired
public boolean isExpired()Whether it has expired by now. -
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. -
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. -
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 '=='. -
inviterId
Returns the value of theinviterIdrecord component.- Returns:
- the value of the
inviterIdrecord component
-
inviteeId
Returns the value of theinviteeIdrecord component.- Returns:
- the value of the
inviteeIdrecord component
-
partyId
Returns the value of thepartyIdrecord component.- Returns:
- the value of the
partyIdrecord component
-
expiresAt
public long expiresAt()Returns the value of theexpiresAtrecord component.- Returns:
- the value of the
expiresAtrecord component
-