Record Class PunishmentRequest
java.lang.Object
java.lang.Record
dev.plex.api.punishment.PunishmentRequest
- Record Components:
punished- UUID of the player being punishedpunisher- UUID of the actor issuing the punishmentsource- source that issued the punishmentpunisherReference- source-specific actor referenceip- IP address associated with the punished playertype- punishment type to applyreason- punishment reasonendDate- punishment end date, ornullfor instant punishments; fixed-duration types replace this value
public record PunishmentRequest(UUID punished, @Nullable UUID punisher, PunishmentSource source, @Nullable String punisherReference, @Nullable String ip, PunishmentType type, String reason, @Nullable ZonedDateTime endDate)
extends Record
Request payload used to create a punishment for a player.
-
Constructor Summary
ConstructorsConstructorDescriptionPunishmentRequest(UUID punished, @Nullable UUID punisher, PunishmentSource source, @Nullable String punisherReference, @Nullable String ip, PunishmentType type, String reason, @Nullable ZonedDateTime endDate) Creates and validates a punishment request. -
Method Summary
Modifier and TypeMethodDescription@Nullable ZonedDateTimeendDate()Returns the value of theendDaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Stringip()Returns the value of theiprecord component.punished()Returns the value of thepunishedrecord component.@Nullable UUIDpunisher()Returns the value of thepunisherrecord component.@Nullable StringReturns the value of thepunisherReferencerecord component.reason()Returns the value of thereasonrecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
PunishmentRequest
public PunishmentRequest(UUID punished, @Nullable @Nullable UUID punisher, PunishmentSource source, @Nullable @Nullable String punisherReference, @Nullable @Nullable String ip, PunishmentType type, String reason, @Nullable @Nullable ZonedDateTime endDate) Creates and validates a punishment request.
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
punished
-
punisher
-
source
-
punisherReference
Returns the value of thepunisherReferencerecord component.- Returns:
- the value of the
punisherReferencerecord component
-
ip
-
type
-
reason
-
endDate
-