Interface DisplayInfo.Builder
-
- All Superinterfaces:
Buildable.Builder<DisplayInfo>,Builder<DisplayInfo,DisplayInfo.Builder>,CopyableBuilder<DisplayInfo,DisplayInfo.Builder>,ResettableBuilder<DisplayInfo,DisplayInfo.Builder>
- Enclosing interface:
- DisplayInfo
public static interface DisplayInfo.Builder extends Builder<DisplayInfo,DisplayInfo.Builder>, CopyableBuilder<DisplayInfo,DisplayInfo.Builder>
A builder to createDisplayInfos.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description DisplayInfo.BuilderannounceToChat(boolean announceToChat)Sets whether a notification should be shown in the global chat.DisplayInfobuild()Builds theDisplayInfo.DisplayInfo.Builderdescription(Component description)Sets the description.DisplayInfo.Builderhidden(boolean hidden)Sets whether theAdvancementshould be hidden.default DisplayInfo.Buildericon(Supplier<? extends ItemType> itemType)Sets the icon of the advancement with the specifiedItemType.default DisplayInfo.Buildericon(ItemStack itemStack)Sets the icon of the advancement with the specifiedItemStack.DisplayInfo.Buildericon(ItemStackSnapshot itemStackSnapshot)Sets the icon of the advancement with the specifiedItemStackSnapshot.default DisplayInfo.Buildericon(ItemType itemType)Sets the icon of the advancement with the specifiedItemType.DisplayInfo.BuildershowToast(boolean showToast)Sets whether a toast should be shown.DisplayInfo.Buildertitle(Component title)Sets the title.default DisplayInfo.Buildertype(Supplier<? extends AdvancementType> advancementType)Sets theAdvancementType.DisplayInfo.Buildertype(AdvancementType advancementType)Sets theAdvancementType.-
Methods inherited from interface org.spongepowered.api.util.CopyableBuilder
from
-
-
-
-
Method Detail
-
type
default DisplayInfo.Builder type(Supplier<? extends AdvancementType> advancementType)
Sets theAdvancementType. Defaults toAdvancementTypes.TASK.- Parameters:
advancementType- The advancement type- Returns:
- This builder, for chaining
-
type
DisplayInfo.Builder type(AdvancementType advancementType)
Sets theAdvancementType. Defaults toAdvancementTypes.TASK.- Parameters:
advancementType- The advancement type- Returns:
- This builder, for chaining
-
description
DisplayInfo.Builder description(Component description)
Sets the description. Defaults toComponent.empty().- Parameters:
description- The description- Returns:
- This builder, for chaining
-
title
DisplayInfo.Builder title(Component title)
Sets the title.- Parameters:
title- The title- Returns:
- This builder, for chaining
-
icon
default DisplayInfo.Builder icon(Supplier<? extends ItemType> itemType)
Sets the icon of the advancement with the specifiedItemType.- Parameters:
itemType- The item type- Returns:
- This builder, for chaining
-
icon
default DisplayInfo.Builder icon(ItemType itemType)
Sets the icon of the advancement with the specifiedItemType.- Parameters:
itemType- The item type- Returns:
- This builder, for chaining
-
icon
default DisplayInfo.Builder icon(ItemStack itemStack)
Sets the icon of the advancement with the specifiedItemStack.- Parameters:
itemStack- The item stack- Returns:
- This builder, for chaining
-
icon
DisplayInfo.Builder icon(ItemStackSnapshot itemStackSnapshot)
Sets the icon of the advancement with the specifiedItemStackSnapshot.- Parameters:
itemStackSnapshot- The item stack snapshot- Returns:
- This builder, for chaining
-
showToast
DisplayInfo.Builder showToast(boolean showToast)
Sets whether a toast should be shown. This is the notification that will be displayed in the top right corner.Defaults to
true.- Parameters:
showToast- Whether a toast should be shown- Returns:
- This builder, for chaining
-
announceToChat
DisplayInfo.Builder announceToChat(boolean announceToChat)
Sets whether a notification should be shown in the global chat.Defaults to
true.- Parameters:
announceToChat- Whether a notification should be shown in the chat- Returns:
- This builder, for chaining
-
hidden
DisplayInfo.Builder hidden(boolean hidden)
Sets whether theAdvancementshould be hidden.Hidden advancements will only appear in the tree once they are unlocked. The lines that connect them to other advancements are still present.
- Parameters:
hidden- Is hidden- Returns:
- This builder, for chaining
-
build
DisplayInfo build()
Builds theDisplayInfo.- Specified by:
buildin interfaceBuildable.Builder<DisplayInfo>- Returns:
- The display info
-
-