mirror of
https://github.com/Minestom/Minestom.git
synced 2024-06-28 07:24:57 +02:00
32 lines
1.3 KiB
Java
32 lines
1.3 KiB
Java
package net.minestom.server.advancements;
|
|
|
|
import net.kyori.adventure.text.Component;
|
|
import net.minestom.server.item.ItemStack;
|
|
import net.minestom.server.item.Material;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
/**
|
|
* Represents an {@link Advancement} which is the root of an {@link AdvancementTab}.
|
|
* Every tab requires one since advancements needs to be linked to a parent.
|
|
* <p>
|
|
* The difference between this and an {@link Advancement} is that the root is responsible for the tab background.
|
|
*/
|
|
public class AdvancementRoot extends Advancement {
|
|
public AdvancementRoot(@NotNull Component title, @NotNull Component description,
|
|
@NotNull ItemStack icon, @NotNull FrameType frameType,
|
|
float x, float y,
|
|
@Nullable String background) {
|
|
super(title, description, icon, frameType, x, y);
|
|
setBackground(background);
|
|
}
|
|
|
|
public AdvancementRoot(@NotNull Component title, @NotNull Component description,
|
|
@NotNull Material icon, FrameType frameType,
|
|
float x, float y,
|
|
@Nullable String background) {
|
|
super(title, description, icon, frameType, x, y);
|
|
setBackground(background);
|
|
}
|
|
}
|