Enum Class PlaceholderType
- All Implemented Interfaces:
Serializable
,Comparable<PlaceholderType>
,Constable
Represents all ChatPlugin's integrated placeholders plus PlaceholderAPI and MVdWPlaceholderAPI extensions.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents integrations' placeholders (includes also PlaceholderAPI's and MVdWPlaceholderAPI's).Will translate only the {player} placeholder.Represents player-related placeholders.Represents server-side placeholders. -
Method Summary
Modifier and TypeMethodDescriptionstatic int
count()
Counts the supported placeholders.static PlaceholderType
getPlaceholder
(String input) Gets a placeholder type from an input String.String[]
Gets the list of available placeholders for this placeholder type.static List
<PlaceholderType> getPlaceholders
(List<String> input) Gets a placeholder types list from an input String list.static PlaceholderType
getPlaceholderType
(String identifierWithoutBrackets) Gets the placeholder type that contains the given identifier.static PlaceholderType
Returns the enum constant of this class with the specified name.static PlaceholderType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
JUST_NAME
Will translate only the {player} placeholder. -
PLAYER
Represents player-related placeholders. -
SERVER
Represents server-side placeholders. -
INTEGRATIONS
Represents integrations' placeholders (includes also PlaceholderAPI's and MVdWPlaceholderAPI's).
-
-
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
-
getPlaceholders
Gets the list of available placeholders for this placeholder type.Note: if
this ==
an array with just the integrated placeholders will be returned, even if this includes all the placeholders from PlaceholderAPI and MVdWPlaceholderAPI.INTEGRATIONS
- Returns:
- Array of available placeholders
-
getPlaceholder
Gets a placeholder type from an input String.The input should be equals (ignoring case) to one of this enum's constants. If not,
null
will be returned.- Parameters:
input
-Enum.name()
, ignoring case- Returns:
- Requested placeholder type or
null
if the input is invalid
-
getPlaceholders
Gets a placeholder types list from an input String list.- Parameters:
input
- Input list containingEnum.name()
s, ignoring case- Returns:
- Requested placeholder types
- See Also:
-
getPlaceholderType
Gets the placeholder type that contains the given identifier.Will return
null
if no placeholder types contain the specified identifier.- Parameters:
identifierWithoutBrackets
- Identifier to check- Returns:
- Requested placeholder type
-
count
public static int count()Counts the supported placeholders.- Returns:
- Placeholders' count
-