Class InstanceDiscoveryConfig

java.lang.Object
com.hypixel.hytale.builtin.instances.config.InstanceDiscoveryConfig

public class InstanceDiscoveryConfig extends Object
A configuration for displaying an event title when a player discovers an instance.
  • Field Details

  • Constructor Details

  • Method Details

    • getTitleKey

      @Nullable public String getTitleKey()
      Returns:
      The translation key for the primary title, or null if not set.
    • setTitleKey

      public void setTitleKey(@Nonnull String titleKey)
      Called to set the title key.
      Parameters:
      titleKey - The translation key for the primary title.
    • getSubtitleKey

      @Nullable public String getSubtitleKey()
      Returns:
      The translation key for the subtitle.
    • setSubtitleKey

      public void setSubtitleKey(@Nullable String subtitleKey)
      Called to set the subtitle key.
      Parameters:
      subtitleKey - The translation key for the subtitle.
    • isDisplay

      public boolean isDisplay()
      Returns:
      true if the discovery title should be displayed and the discovery sound played; false otherwise.
    • 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:
      true if the discovery title should always be displayed, even if already discovered; false otherwise.
    • 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

      @Nullable public String getDiscoverySoundEventId()
      Returns:
      the sound event ID, or null if none.
    • setDiscoverySoundEventId

      public void setDiscoverySoundEventId(@Nullable String discoverySoundEventId)
      Called to set the discovery sound event ID.
      Parameters:
      discoverySoundEventId - The sound event ID, or null for no sound.
    • getIcon

      @Nullable public String getIcon()
      Returns:
      the icon to display with the event title, or null if none.
    • setIcon

      public void setIcon(@Nullable String icon)
      Called to set the icon to display with the event title.
      Parameters:
      icon - The icon, or null for none.
    • getStyle

      @Nonnull public EventTitleStyle getStyle()
      Returns:
      the EventTitleStyle used to present the event title.
    • setStyle

      public void setStyle(@Nonnull EventTitleStyle style)
      Called to set the style used to present the event title.
      Parameters:
      style - The EventTitleStyle that the client uses to present the event title.
    • isMajor

      @Deprecated(forRemoval=true) public boolean isMajor()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use getStyle() instead.
      Returns:
      true if this is a major discovery; false otherwise.
    • setMajor

      @Deprecated(forRemoval=true) public void setMajor(boolean major)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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

      @Nonnull public InstanceDiscoveryConfig clone()