Interface DisplayInfo.Builder
-
- All Superinterfaces:
AbstractBuilder<DisplayInfo>
,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 createDisplayInfo
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description DisplayInfo.Builder
announceToChat(boolean announceToChat)
Sets whether a notification should be shown in the global chat.DisplayInfo
build()
Builds theDisplayInfo
.DisplayInfo.Builder
description(Component description)
Sets the description.DisplayInfo.Builder
hidden(boolean hidden)
Sets whether theAdvancement
should be hidden.default DisplayInfo.Builder
icon(java.util.function.Supplier<? extends ItemType> itemType)
Sets the icon of the advancement with the specifiedItemType
.default DisplayInfo.Builder
icon(ItemStack itemStack)
Sets the icon of the advancement with the specifiedItemStack
.DisplayInfo.Builder
icon(ItemStackSnapshot itemStackSnapshot)
Sets the icon of the advancement with the specifiedItemStackSnapshot
.default DisplayInfo.Builder
icon(ItemType itemType)
Sets the icon of the advancement with the specifiedItemType
.DisplayInfo.Builder
showToast(boolean showToast)
Sets whether a toast should be shown.DisplayInfo.Builder
title(Component title)
Sets the title.default DisplayInfo.Builder
type(java.util.function.Supplier<? extends AdvancementType> advancementType)
Sets theAdvancementType
.DisplayInfo.Builder
type(AdvancementType advancementType)
Sets theAdvancementType
.-
Methods inherited from interface org.spongepowered.api.util.CopyableBuilder
from
-
-
-
-
Method Detail
-
type
default DisplayInfo.Builder type(java.util.function.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(java.util.function.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 theAdvancement
should 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:
build
in interfaceAbstractBuilder<DisplayInfo>
- Specified by:
build
in interfaceBuildable.Builder<DisplayInfo>
- Returns:
- The display info
-
-