Enum BroadcastType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<BroadcastType>

    public enum BroadcastType
    extends java.lang.Enum<BroadcastType>
    The different types of broadcasts for an AnnoyingMessage
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ACTIONBAR
      Message will be displayed in the action bar (1.11+ only, CHAT will be used for older versions)
      CHAT
      Message will be sent in chat
      FULL_TITLE
      Only use this if the key has 2 children, "title" and "subtitle"
      SUBTITLE
      Message will be sent as a subtitle
      TITLE
      Message will be sent as a title
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isTitle()
      Whether the broadcast type is a title (TITLE, SUBTITLE, or FULL_TITLE), aka anything that has a fadeIn, stay, and fadeOut
      static BroadcastType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static BroadcastType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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 Detail

      • values

        public static BroadcastType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (BroadcastType c : BroadcastType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static BroadcastType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.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