Enum Class BroadcastType

java.lang.Object
java.lang.Enum<BroadcastType>
xyz.srnyx.annoyingapi.message.BroadcastType
All Implemented Interfaces:
Serializable, Comparable<BroadcastType>, Constable

public enum BroadcastType extends Enum<BroadcastType>
The different types of broadcasts for an AnnoyingMessage
  • Enum Constant Details

    • CHAT

      public static final BroadcastType CHAT
      Message will be sent in chat
    • ACTIONBAR

      public static final BroadcastType ACTIONBAR
      Message will be displayed in the action bar (1.11+ only, CHAT will be used for older versions)
    • TITLE

      public static final BroadcastType TITLE
      Message will be sent as a title
    • SUBTITLE

      public static final BroadcastType SUBTITLE
      Message will be sent as a subtitle
    • FULL_TITLE

      public static final BroadcastType FULL_TITLE
      Only use this if the key has 2 children, "title" and "subtitle"

      The "title" child will be sent as the title and the "subtitle" child will be sent as the subtitle

  • Method Details

    • values

      public static BroadcastType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BroadcastType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isTitle

      public boolean isTitle()
      Whether the broadcast type is a title (TITLE, SUBTITLE, or FULL_TITLE), aka anything that has a fadeIn, stay, and fadeOut
      Returns:
      true if the broadcast type is a title