Package xyz.srnyx.annoyingapi.message
Enum BroadcastType
- java.lang.Object
-
- java.lang.Enum<BroadcastType>
-
- xyz.srnyx.annoyingapi.message.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 anAnnoyingMessage
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIONBARMessage will be displayed in the action bar (1.11+ only,CHATwill be used for older versions)CHATMessage will be sent in chatFULL_TITLEOnly use this if the key has 2 children, "title" and "subtitle"SUBTITLEMessage will be sent as a subtitleTITLEMessage will be sent as a title
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisTitle()Whether the broadcast type is a title (TITLE,SUBTITLE, orFULL_TITLE), aka anything that has afadeIn,stay, andfadeOutstatic BroadcastTypevalueOf(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.
-
-
-
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,CHATwill 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 namejava.lang.NullPointerException- if the argument is null
-
isTitle
public boolean isTitle()
Whether the broadcast type is a title (TITLE,SUBTITLE, orFULL_TITLE), aka anything that has afadeIn,stay, andfadeOut- Returns:
- true if the broadcast type is a title
-
-