Interface Title


public interface Title
Represents a configuration of a title. A title in Minecraft consists of a main title and a sub title. It will fadeIn(int), stay(int), and fadeOut(int) for a specified amount of time. In most cases you will want to reset() the current title first so your title won't be affected by a previous one.

You can create a new configuration by calling ProxyServer.createTitle().

  • Method Summary

    Modifier and Type
    Method
    Description
    Remove the currently displayed title from the player's screen.
    fadeIn(int ticks)
    Set the duration in ticks of the fade in effect of the title.
    fadeOut(int ticks)
    Set the duration in ticks of the fade out effect of the title.
    Remove the currently displayed title from the player's screen and set the configuration back to the default values.
    Send this title configuration to the specified player.
    stay(int ticks)
    Set the duration in ticks how long the title should stay on the screen.
    Set the subtitle to send to the player.
    Set the subtitle to send to the player.
    Set the title to send to the player.
    Set the title to send to the player.
  • Method Details

    • title

      Title title(BaseComponent text)
      Set the title to send to the player.
      Parameters:
      text - The text to use as the title.
      Returns:
      This title configuration.
    • title

      Title title(BaseComponent... text)
      Set the title to send to the player.
      Parameters:
      text - The text to use as the title.
      Returns:
      This title configuration.
    • subTitle

      Title subTitle(BaseComponent text)
      Set the subtitle to send to the player.
      Parameters:
      text - The text to use as the subtitle.
      Returns:
      This title configuration.
    • subTitle

      Title subTitle(BaseComponent... text)
      Set the subtitle to send to the player.
      Parameters:
      text - The text to use as the subtitle.
      Returns:
      This title configuration.
    • fadeIn

      Title fadeIn(int ticks)
      Set the duration in ticks of the fade in effect of the title. Once this period of time is over the title will stay for the amount of time specified in stay(int). The default value for the official Minecraft version is 20 (1 second).
      Parameters:
      ticks - The amount of ticks (1/20 second) for the fade in effect.
      Returns:
      This title configuration.
    • stay

      Title stay(int ticks)
      Set the duration in ticks how long the title should stay on the screen. Once this period of time is over the title will fade out using the duration specified in fadeOut(int). The default value for the official Minecraft version is 60 (3 seconds).
      Parameters:
      ticks - The amount of ticks (1/20 second) for the stay effect.
      Returns:
      This title configuration.
    • fadeOut

      Title fadeOut(int ticks)
      Set the duration in ticks of the fade out effect of the title. The default value for the official Minecraft version is 20 (1 second).
      Parameters:
      ticks - The amount of ticks (1/20 second) for the fade out effect.
      Returns:
      This title configuration.
    • clear

      Title clear()
      Remove the currently displayed title from the player's screen. This will keep the currently used display times and will only remove the title.
      Returns:
      This title configuration.
    • reset

      Title reset()
      Remove the currently displayed title from the player's screen and set the configuration back to the default values.
      Returns:
      This title configuration.
    • send

      Title send(ProxiedPlayer player)
      Send this title configuration to the specified player. This is the same as calling ProxiedPlayer.sendTitle(Title).
      Parameters:
      player - The player to send the title to.
      Returns:
      This title configuration.