All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.minestom.server.advancements.notifications.Notification Maven / Gradle / Ivy

There is a newer version: 7320437640
Show newest version
package net.minestom.server.advancements.notifications;

import net.kyori.adventure.text.Component;
import net.minestom.server.advancements.FrameType;
import net.minestom.server.item.ItemStack;
import net.minestom.server.item.Material;
import org.jetbrains.annotations.NotNull;

/**
 * Represents a message which can be sent using the {@link NotificationCenter}.
 */
public record Notification(@NotNull Component title, @NotNull FrameType frameType, @NotNull ItemStack icon) {
    public Notification(@NotNull Component title, @NotNull FrameType frameType, @NotNull Material icon) {
        this(title, frameType, ItemStack.of(icon));
    }

    @Deprecated
    public @NotNull Component getTitle() {
        return title;
    }

    @Deprecated
    public @NotNull FrameType getFrameType() {
        return frameType;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy