Package dev.itsharshxd.zentrix.api.arena
Record Class ArenaSourceRequest
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.arena.ArenaSourceRequest
- Record Components:
purpose- why the source is neededgameTypeName- thegame-types.ymlname the source will be played underrequesterId- the player the request is made for, or null for a server-side requestrequesterName- the display name of that player, empty when there is none
public record ArenaSourceRequest(@NotNull ArenaSourcePurpose purpose, @NotNull String gameTypeName, @Nullable UUID requesterId, @NotNull String requesterName)
extends Record
What Zentrix wants a source arena for.
A provider may use the game type to pick a suitable source, but is never required to: Zentrix applies the requested game type to whatever source it is handed.
-
Constructor Summary
ConstructorsConstructorDescriptionArenaSourceRequest(@NotNull ArenaSourcePurpose purpose, @NotNull String gameTypeName, @Nullable UUID requesterId, @NotNull String requesterName) Creates an instance of aArenaSourceRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull StringReturns the value of thegameTypeNamerecord component.final inthashCode()Returns a hash code value for this object.@NotNull ArenaSourcePurposepurpose()Returns the value of thepurposerecord component.@Nullable UUIDReturns the value of therequesterIdrecord component.@NotNull StringReturns the value of therequesterNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ArenaSourceRequest
public ArenaSourceRequest(@NotNull @NotNull ArenaSourcePurpose purpose, @NotNull @NotNull String gameTypeName, @Nullable @Nullable UUID requesterId, @NotNull @NotNull String requesterName) Creates an instance of aArenaSourceRequestrecord class.- Parameters:
purpose- the value for thepurposerecord componentgameTypeName- the value for thegameTypeNamerecord componentrequesterId- the value for therequesterIdrecord componentrequesterName- the value for therequesterNamerecord component
-
-
Method Details
-
getRequesterId
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
purpose
Returns the value of thepurposerecord component.- Returns:
- the value of the
purposerecord component
-
gameTypeName
Returns the value of thegameTypeNamerecord component.- Returns:
- the value of the
gameTypeNamerecord component
-
requesterId
Returns the value of therequesterIdrecord component.- Returns:
- the value of the
requesterIdrecord component
-
requesterName
Returns the value of therequesterNamerecord component.- Returns:
- the value of the
requesterNamerecord component
-