Interface DisplayInfo.Builder
- All Superinterfaces:
AbstractBuilder<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 create
DisplayInfo
s.-
Method Summary
Modifier and TypeMethodDescriptionannounceToChat
(boolean announceToChat) Sets whether a notification should be shown in the global chat.build()
Builds theDisplayInfo
.description
(Component description) Sets the description.hidden
(boolean hidden) Sets whether theAdvancement
should be hidden.default DisplayInfo.Builder
Sets the icon of the advancement with the specifiedItemType
.icon
(ItemStackLike itemStack) Sets the icon of the advancement with the specifiedItemStackLike
.default DisplayInfo.Builder
Sets the icon of the advancement with the specifiedItemType
.showToast
(boolean showToast) Sets whether a toast should be shown.Sets the title.default DisplayInfo.Builder
type
(Supplier<? extends AdvancementType> advancementType) Sets theAdvancementType
.type
(AdvancementType advancementType) Sets theAdvancementType
.Methods inherited from interface org.spongepowered.api.util.CopyableBuilder
from
-
Method Details
-
type
Sets theAdvancementType
. Defaults toAdvancementTypes.TASK
.- Parameters:
advancementType
- The advancement type- Returns:
- This builder, for chaining
-
type
Sets theAdvancementType
. Defaults toAdvancementTypes.TASK
.- Parameters:
advancementType
- The advancement type- Returns:
- This builder, for chaining
-
description
Sets the description. Defaults toComponent.empty()
.- Parameters:
description
- The description- Returns:
- This builder, for chaining
-
title
Sets the title.- Parameters:
title
- The title- Returns:
- This builder, for chaining
-
icon
Sets the icon of the advancement with the specifiedItemType
.- Parameters:
itemType
- The item type- Returns:
- This builder, for chaining
-
icon
Sets the icon of the advancement with the specifiedItemType
.- Parameters:
itemType
- The item type- Returns:
- This builder, for chaining
-
icon
Sets the icon of the advancement with the specifiedItemStackLike
.- Parameters:
itemStack
- The item stack snapshot- Returns:
- This builder, for chaining
-
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
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
-
build
DisplayInfo build()Builds theDisplayInfo
.- Specified by:
build
in interfaceAbstractBuilder<DisplayInfo>
- Returns:
- The display info
-