Package xyz.srnyx.annoyingapi.message
Enum Class BroadcastType
- All Implemented Interfaces:
Serializable,Comparable<BroadcastType>,Constable
The different types of broadcasts for an
AnnoyingMessage-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMessage will be displayed in the action bar (1.11+ only,CHATwill be used for older versions)Message will be sent in chatOnly use this if the key has 2 children, "title" and "subtitle"Message will be sent as a subtitleMessage will be sent as a title -
Method Summary
Modifier and TypeMethodDescriptionbooleanisTitle()Whether the broadcast type is a title (TITLE,SUBTITLE, orFULL_TITLE), aka anything that has afadeIn,stay, andfadeOutstatic BroadcastTypeReturns the enum constant of this class with the specified name.static BroadcastType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CHAT
Message will be sent in chat -
ACTIONBAR
Message will be displayed in the action bar (1.11+ only,CHATwill be used for older versions) -
TITLE
Message will be sent as a title -
SUBTITLE
Message will be sent as a subtitle -
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
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
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 nameNullPointerException- 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
-