Class Title

java.lang.Object
com.destroystokyo.paper.Title

@Deprecated public final class Title extends Object
Deprecated.
use Title
Represents a title to may be sent to a Player.

A title can be sent without subtitle text.

  • Field Details

    • DEFAULT_FADE_IN

      public static final int DEFAULT_FADE_IN
      Deprecated.
      The default number of ticks for the title to fade in.
      See Also:
    • DEFAULT_STAY

      public static final int DEFAULT_STAY
      Deprecated.
      The default number of ticks for the title to stay.
      See Also:
    • DEFAULT_FADE_OUT

      public static final int DEFAULT_FADE_OUT
      Deprecated.
      The default number of ticks for the title to fade out.
      See Also:
  • Constructor Details

    • Title

      public Title(@NotNull @NotNull BaseComponent title)
      Deprecated.
      Create a title with the default time values and no subtitle.

      Times use default values.

      Parameters:
      title - the main text of the title
      Throws:
      NullPointerException - if the title is null
    • Title

      public Title(@NotNull @NotNull BaseComponent[] title)
      Deprecated.
      Create a title with the default time values and no subtitle.

      Times use default values.

      Parameters:
      title - the main text of the title
      Throws:
      NullPointerException - if the title is null
    • Title

      public Title(@NotNull @NotNull String title)
      Deprecated.
      Create a title with the default time values and no subtitle.

      Times use default values.

      Parameters:
      title - the main text of the title
      Throws:
      NullPointerException - if the title is null
    • Title

      Deprecated.
      Create a title with the default time values.

      Times use default values.

      Parameters:
      title - the main text of the title
      subtitle - the secondary text of the title
    • Title

      public Title(@NotNull @NotNull BaseComponent[] title, @Nullable @Nullable BaseComponent[] subtitle)
      Deprecated.
      Create a title with the default time values.

      Times use default values.

      Parameters:
      title - the main text of the title
      subtitle - the secondary text of the title
    • Title

      public Title(@NotNull @NotNull String title, @Nullable @Nullable String subtitle)
      Deprecated.
      Create a title with the default time values.

      Times use default values.

      Parameters:
      title - the main text of the title
      subtitle - the secondary text of the title
    • Title

      public Title(@NotNull @NotNull BaseComponent title, @Nullable @Nullable BaseComponent subtitle, int fadeIn, int stay, int fadeOut)
      Deprecated.
      Creates a new title.
      Parameters:
      title - the main text of the title
      subtitle - the secondary text of the title
      fadeIn - the number of ticks for the title to fade in
      stay - the number of ticks for the title to stay on screen
      fadeOut - the number of ticks for the title to fade out
      Throws:
      IllegalArgumentException - if any of the times are negative
    • Title

      public Title(@Nullable @Nullable BaseComponent[] title, @NotNull @NotNull BaseComponent[] subtitle, int fadeIn, int stay, int fadeOut)
      Deprecated.
      Creates a new title.
      Parameters:
      title - the main text of the title
      subtitle - the secondary text of the title
      fadeIn - the number of ticks for the title to fade in
      stay - the number of ticks for the title to stay on screen
      fadeOut - the number of ticks for the title to fade out
      Throws:
      IllegalArgumentException - if any of the times are negative
    • Title

      public Title(@NotNull @NotNull String title, @Nullable @Nullable String subtitle, int fadeIn, int stay, int fadeOut)
      Deprecated.
      Creates a new title.

      It is recommended to the BaseComponent constrctors.

      Parameters:
      title - the main text of the title
      subtitle - the secondary text of the title
      fadeIn - the number of ticks for the title to fade in
      stay - the number of ticks for the title to stay on screen
      fadeOut - the number of ticks for the title to fade out
  • Method Details

    • getTitle

      @NotNull public @NotNull BaseComponent[] getTitle()
      Deprecated.
      Gets the text of this title
      Returns:
      the text
    • getSubtitle

      @Nullable public @Nullable BaseComponent[] getSubtitle()
      Deprecated.
      Gets the text of this title's subtitle
      Returns:
      the text
    • getFadeIn

      public int getFadeIn()
      Deprecated.
      Gets the number of ticks to fade in.

      The returned value is never negative.

      Returns:
      the number of ticks to fade in
    • getStay

      public int getStay()
      Deprecated.
      Gets the number of ticks to stay.

      The returned value is never negative.

      Returns:
      the number of ticks to stay
    • getFadeOut

      public int getFadeOut()
      Deprecated.
      Gets the number of ticks to fade out.

      The returned value is never negative.

      Returns:
      the number of ticks to fade out
    • send

      public void send(@NotNull @NotNull Player player)
      Deprecated.
      Sends the title directly to an player
      Parameters:
      player - the receiver of the title
    • send

      public void send(@NotNull @NotNull Collection<? extends Player> players)
      Deprecated.
      Sends the title directly to the defined players
      Parameters:
      players - the receivers of the title
    • send

      public void send(@NotNull @NotNull Player[] players)
      Deprecated.
      Sends the title directly to the defined players
      Parameters:
      players - the receivers of the title
    • broadcast

      public void broadcast()
      Deprecated.
      Sends the title directly to all online players
    • builder

      @NotNull public static @NotNull Title.Builder builder()
      Deprecated.