Record Class PaperDialogPayload

java.lang.Object
java.lang.Record
io.github.projectunified.unidialog.paper.payload.PaperDialogPayload
All Implemented Interfaces:
io.github.projectunified.unidialog.core.payload.DialogPayload

public record PaperDialogPayload(UUID owner, @Nullable io.papermc.paper.dialog.DialogResponseView view) extends Record implements io.github.projectunified.unidialog.core.payload.DialogPayload
  • Constructor Details

    • PaperDialogPayload

      public PaperDialogPayload(UUID owner, @Nullable @Nullable io.papermc.paper.dialog.DialogResponseView view)
      Creates an instance of a PaperDialogPayload record class.
      Parameters:
      owner - the value for the owner record component
      view - the value for the view record component
  • Method Details

    • textValue

      @Nullable public @Nullable String textValue(String key)
      Specified by:
      textValue in interface io.github.projectunified.unidialog.core.payload.DialogPayload
    • booleanValue

      @Nullable public @Nullable Boolean booleanValue(String key)
      Specified by:
      booleanValue in interface io.github.projectunified.unidialog.core.payload.DialogPayload
    • numberValue

      @Nullable public @Nullable Number numberValue(String key)
      Specified by:
      numberValue in interface io.github.projectunified.unidialog.core.payload.DialogPayload
    • map

      public Map<String,String> map()
      Specified by:
      map in interface io.github.projectunified.unidialog.core.payload.DialogPayload
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • owner

      public UUID owner()
      Returns the value of the owner record component.
      Specified by:
      owner in interface io.github.projectunified.unidialog.core.payload.DialogPayload
      Returns:
      the value of the owner record component
    • view

      @Nullable public @Nullable io.papermc.paper.dialog.DialogResponseView view()
      Returns the value of the view record component.
      Returns:
      the value of the view record component