Package net.minestom.server.advancements
Record Class Notification
java.lang.Object
java.lang.Record
net.minestom.server.advancements.Notification
public record Notification(@NotNull Component title, @NotNull FrameType frameType, @NotNull ItemStack icon)
extends Record
Represents a toast which can be sent to the player using
Player.sendNotification(Notification)
.-
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 TypeMethodDescription@NotNull AdvancementsPacket
@NotNull AdvancementsPacket
final boolean
Indicates whether some other object is "equal to" this one.@NotNull FrameType
Returns the value of theframeType
record component.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
-
buildAddPacket
-
buildRemovePacket
-
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
-