Package net.glowstone.advancement
Class GlowAdvancementDisplay
java.lang.Object
net.glowstone.advancement.GlowAdvancementDisplay
- All Implemented Interfaces:
io.papermc.paper.advancement.AdvancementDisplay
public class GlowAdvancementDisplay
extends Object
implements io.papermc.paper.advancement.AdvancementDisplay
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.papermc.paper.advancement.AdvancementDisplay
io.papermc.paper.advancement.AdvancementDisplay.Frame
-
Constructor Summary
ConstructorDescriptionGlowAdvancementDisplay
(TextMessage title, TextMessage description, org.bukkit.inventory.ItemStack icon, io.papermc.paper.advancement.AdvancementDisplay.Frame type, org.bukkit.NamespacedKey background, float x, float y) -
Method Summary
Modifier and TypeMethodDescription@Nullable org.bukkit.NamespacedKey
protected boolean
@NotNull net.kyori.adventure.text.Component
boolean
boolean
io.netty.buffer.ByteBuf
encode
(io.netty.buffer.ByteBuf buf, boolean hasBackgroundTexture, boolean showToast, boolean hidden) Writes this notification to the givenByteBuf
.boolean
@NotNull io.papermc.paper.advancement.AdvancementDisplay.Frame
frame()
org.bukkit.NamespacedKey
The optional directory for the background to use in this advancement tab (used only for the root advancement)The description for this advancementorg.bukkit.inventory.ItemStack
getIcon()
The icon to represent this advancementgetTitle()
The title for this advancementio.papermc.paper.advancement.AdvancementDisplay.Frame
getType()
The type of frame for the iconfloat
getX()
The x coordinate of the advancementfloat
getY()
The y coordinate of the advancementint
hashCode()
@NotNull org.bukkit.inventory.ItemStack
icon()
boolean
isHidden()
@NotNull net.kyori.adventure.text.Component
title()
toString()
-
Constructor Details
-
GlowAdvancementDisplay
public GlowAdvancementDisplay(TextMessage title, TextMessage description, org.bukkit.inventory.ItemStack icon, io.papermc.paper.advancement.AdvancementDisplay.Frame type, org.bukkit.NamespacedKey background, float x, float y)
-
-
Method Details
-
encode
public io.netty.buffer.ByteBuf encode(io.netty.buffer.ByteBuf buf, boolean hasBackgroundTexture, boolean showToast, boolean hidden) throws IOException Writes this notification to the givenByteBuf
.- Parameters:
buf
- the buffer to write tohasBackgroundTexture
- Whether the advancement notification has a background textureshowToast
- Whether or not to show the toast pop up after completing this advancementhidden
- Whether or not to hide this advancement and all its children from the advancement screen until this advancement have been completed- Returns:
buf
, with this notification written to it- Throws:
IOException
- if a string is too long
-
frame
@NotNull public @NotNull io.papermc.paper.advancement.AdvancementDisplay.Frame frame()- Specified by:
frame
in interfaceio.papermc.paper.advancement.AdvancementDisplay
-
title
@NotNull public @NotNull net.kyori.adventure.text.Component title()- Specified by:
title
in interfaceio.papermc.paper.advancement.AdvancementDisplay
-
description
@NotNull public @NotNull net.kyori.adventure.text.Component description()- Specified by:
description
in interfaceio.papermc.paper.advancement.AdvancementDisplay
-
icon
@NotNull public @NotNull org.bukkit.inventory.ItemStack icon()- Specified by:
icon
in interfaceio.papermc.paper.advancement.AdvancementDisplay
-
doesShowToast
public boolean doesShowToast()- Specified by:
doesShowToast
in interfaceio.papermc.paper.advancement.AdvancementDisplay
-
doesAnnounceToChat
public boolean doesAnnounceToChat()- Specified by:
doesAnnounceToChat
in interfaceio.papermc.paper.advancement.AdvancementDisplay
-
isHidden
public boolean isHidden()- Specified by:
isHidden
in interfaceio.papermc.paper.advancement.AdvancementDisplay
-
backgroundPath
@Nullable public @Nullable org.bukkit.NamespacedKey backgroundPath()- Specified by:
backgroundPath
in interfaceio.papermc.paper.advancement.AdvancementDisplay
-
getTitle
The title for this advancement -
getDescription
The description for this advancement -
getIcon
public org.bukkit.inventory.ItemStack getIcon()The icon to represent this advancement -
getType
public io.papermc.paper.advancement.AdvancementDisplay.Frame getType()The type of frame for the icon -
getBackground
public org.bukkit.NamespacedKey getBackground()The optional directory for the background to use in this advancement tab (used only for the root advancement) -
getX
public float getX()The x coordinate of the advancement -
getY
public float getY()The y coordinate of the advancement -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-