Record Class Notification
java.lang.Object
java.lang.Record
net.minestom.server.advancements.notifications.Notification
public record Notification(@NotNull Component title, @NotNull FrameType frameType, @NotNull ItemStack icon)
extends Record
Represents a message which can be sent using the
NotificationCenter
.-
Constructor Summary
ConstructorDescriptionNotification
(@NotNull Component title, @NotNull FrameType frameType, @NotNull ItemStack icon) Creates an instance of aNotification
record class.Notification
(@NotNull Component title, @NotNull FrameType frameType, @NotNull Material icon) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.@NotNull FrameType
Returns the value of theframeType
record component.@NotNull FrameType
Deprecated.@NotNull Component
getTitle()
Deprecated.final int
hashCode()
Returns a hash code value for this object.@NotNull ItemStack
icon()
Returns the value of theicon
record component.@NotNull Component
title()
Returns the value of thetitle
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Notification
-
Notification
public Notification(@NotNull @NotNull Component title, @NotNull @NotNull FrameType frameType, @NotNull @NotNull ItemStack icon) Creates an instance of aNotification
record class.- Parameters:
title
- the value for thetitle
record componentframeType
- the value for theframeType
record componenticon
- the value for theicon
record component
-
-
Method Details
-
getTitle
Deprecated. -
getFrameType
Deprecated. -
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
Returns the value of thetitle
record component.- Returns:
- the value of the
title
record component
-
frameType
Returns the value of theframeType
record component.- Returns:
- the value of the
frameType
record component
-
icon
Returns the value of theicon
record component.- Returns:
- the value of the
icon
record component
-