Record Class Notification
java.lang.Object
java.lang.Record
net.minestom.server.advancements.notifications.Notification
public record Notification(@NotNull net.kyori.adventure.text.Component title, @NotNull FrameType frameType, @NotNull ItemStack icon)
extends Record
Represents a message which can be sent using the
NotificationCenter.-
Constructor Summary
ConstructorsConstructorDescriptionNotification(@NotNull net.kyori.adventure.text.Component title, @NotNull FrameType frameType, @NotNull ItemStack icon) Creates an instance of aNotificationrecord class.Notification(@NotNull net.kyori.adventure.text.Component title, @NotNull FrameType frameType, @NotNull Material icon) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull FrameTypeReturns the value of theframeTyperecord component.final inthashCode()Returns a hash code value for this object.@NotNull ItemStackicon()Returns the value of theiconrecord component.@NotNull net.kyori.adventure.text.Componenttitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Notification
-
Notification
public Notification(@NotNull @NotNull net.kyori.adventure.text.Component title, @NotNull @NotNull FrameType frameType, @NotNull @NotNull ItemStack icon) Creates an instance of aNotificationrecord class.- Parameters:
title- the value for thetitlerecord componentframeType- the value for theframeTyperecord componenticon- the value for theiconrecord component
-
-
Method Details
-
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). -
title
@NotNull public @NotNull net.kyori.adventure.text.Component title()Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
frameType
Returns the value of theframeTyperecord component.- Returns:
- the value of the
frameTyperecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-