Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- getTitleKey()
- setTitleKey(String)
- getSubtitleKey()
- setSubtitleKey(String)
- isDisplay()
- setDisplay(boolean)
- alwaysDisplay()
- setAlwaysDisplay(boolean)
- getDiscoverySoundEventId()
- setDiscoverySoundEventId(String)
- getIcon()
- setIcon(String)
- getStyle()
- setStyle(EventTitleStyle)
- isMajor()
- setMajor(boolean)
- getDuration()
- setDuration(float)
- getFadeInDuration()
- setFadeInDuration(float)
- getFadeOutDuration()
- setFadeOutDuration(float)
- clone()
Class InstanceDiscoveryConfig
java.lang.Object
com.hypixel.hytale.builtin.instances.config.InstanceDiscoveryConfig
A configuration for displaying an event title when a player discovers an instance.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<InstanceDiscoveryConfig> The codec used to parseInstanceDiscoveryConfiginstances. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanclone()floatfloatfloatgetIcon()getStyle()booleanbooleanisMajor()Deprecated, for removal: This API element is subject to removal in a future version.voidsetAlwaysDisplay(boolean alwaysDisplay) Called to set whether to always display the discovery title, even if already discovered.voidsetDiscoverySoundEventId(String discoverySoundEventId) Called to set the discovery sound event ID.voidsetDisplay(boolean display) Called to set whether to display the discovery title and play the discovery sound.voidsetDuration(float duration) Called to set the duration of the event title.voidsetFadeInDuration(float fadeInDuration) Called to set the fade-in duration of the event title.voidsetFadeOutDuration(float fadeOutDuration) Called to set the fade-out duration of the event title.voidCalled to set the icon to display with the event title.voidsetMajor(boolean major) Deprecated, for removal: This API element is subject to removal in a future version.UsesetStyle(EventTitleStyle)instead.voidsetStyle(EventTitleStyle style) Called to set the style used to present the event title.voidsetSubtitleKey(String subtitleKey) Called to set the subtitle key.voidsetTitleKey(String titleKey) Called to set the title key.
-
Field Details
-
CODEC
The codec used to parseInstanceDiscoveryConfiginstances.
-
-
Constructor Details
-
InstanceDiscoveryConfig
public InstanceDiscoveryConfig()Default Constructor for anInstanceDiscoveryConfiginstance.Used by the codec to parse
InstanceDiscoveryConfiginstances.
-
-
Method Details
-
getTitleKey
- Returns:
- The translation key for the primary title, or
nullif not set.
-
setTitleKey
Called to set the title key.- Parameters:
titleKey- The translation key for the primary title.
-
getSubtitleKey
- Returns:
- The translation key for the subtitle.
-
setSubtitleKey
Called to set the subtitle key.- Parameters:
subtitleKey- The translation key for the subtitle.
-
isDisplay
public boolean isDisplay()- Returns:
trueif the discovery title should be displayed and the discovery sound played;falseotherwise.
-
setDisplay
public void setDisplay(boolean display) Called to set whether to display the discovery title and play the discovery sound.- Parameters:
display- Whether to display the discovery title and play the discovery sound.
-
alwaysDisplay
public boolean alwaysDisplay()- Returns:
trueif the discovery title should always be displayed, even if already discovered;falseotherwise.
-
setAlwaysDisplay
public void setAlwaysDisplay(boolean alwaysDisplay) Called to set whether to always display the discovery title, even if already discovered.- Parameters:
alwaysDisplay- Whether to always display the discovery title.
-
getDiscoverySoundEventId
- Returns:
- the sound event ID, or
nullif none.
-
setDiscoverySoundEventId
Called to set the discovery sound event ID.- Parameters:
discoverySoundEventId- The sound event ID, ornullfor no sound.
-
getIcon
- Returns:
- the icon to display with the event title, or
nullif none.
-
setIcon
Called to set the icon to display with the event title.- Parameters:
icon- The icon, ornullfor none.
-
getStyle
- Returns:
- the
EventTitleStyleused to present the event title.
-
setStyle
Called to set the style used to present the event title.- Parameters:
style- TheEventTitleStylethat the client uses to present the event title.
-
isMajor
Deprecated, for removal: This API element is subject to removal in a future version.UsegetStyle()instead.- Returns:
trueif this is a major discovery;falseotherwise.
-
setMajor
Deprecated, for removal: This API element is subject to removal in a future version.UsesetStyle(EventTitleStyle)instead.Called to set whether this is a major discovery.- Parameters:
major- Whether this is a major discovery.
-
getDuration
public float getDuration()- Returns:
- The duration, in seconds, of the event title.
-
setDuration
public void setDuration(float duration) Called to set the duration of the event title.- Parameters:
duration- The duration, in seconds, of the event title.
-
getFadeInDuration
public float getFadeInDuration()- Returns:
- The fade-in duration, in seconds, of the event title.
-
setFadeInDuration
public void setFadeInDuration(float fadeInDuration) Called to set the fade-in duration of the event title.- Parameters:
fadeInDuration- The fade-in duration, in seconds, of the event title.
-
getFadeOutDuration
public float getFadeOutDuration()- Returns:
- The fade-out duration, in seconds, of the event title.
-
setFadeOutDuration
public void setFadeOutDuration(float fadeOutDuration) Called to set the fade-out duration of the event title.- Parameters:
fadeOutDuration- The fade-out duration, in seconds, of the event title.
-
clone
-
getStyle()instead.