2018-03-21 14:15:51 +01:00
/ *
2020-07-27 09:21:35 +02:00
* This file is part of PlaceholderAPI
2018-03-21 14:15:51 +01:00
*
* PlaceholderAPI
2020-07-27 09:21:35 +02:00
* Copyright ( c ) 2015 - 2020 PlaceholderAPI Team
2018-03-21 14:15:51 +01:00
*
2020-07-27 09:21:35 +02:00
* PlaceholderAPI free software : you can redistribute it and / or modify
2018-03-21 14:15:51 +01:00
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .
*
2020-07-27 09:21:35 +02:00
* PlaceholderAPI is distributed in the hope that it will be useful ,
2018-03-21 14:15:51 +01:00
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program . If not , see < http : //www.gnu.org/licenses/>.
* /
2020-07-27 09:21:35 +02:00
2018-03-21 00:04:14 +01:00
package me.clip.placeholderapi ;
2018-04-21 04:11:54 +02:00
import com.google.common.collect.ImmutableSet ;
2018-03-21 00:04:14 +01:00
import me.clip.placeholderapi.expansion.PlaceholderExpansion ;
import me.clip.placeholderapi.expansion.Relational ;
2020-07-20 23:23:27 +02:00
import me.clip.placeholderapi.replacer.CharsReplacer ;
import me.clip.placeholderapi.replacer.Replacer ;
import me.clip.placeholderapi.replacer.Replacer.Closure ;
2020-07-20 22:57:16 +02:00
import me.clip.placeholderapi.util.Msg ;
2018-05-31 20:35:28 +02:00
import org.bukkit.OfflinePlayer ;
2018-03-21 00:04:14 +01:00
import org.bukkit.entity.Player ;
2020-07-30 15:53:12 +02:00
import org.bukkit.plugin.Plugin ;
2020-07-27 17:40:58 +02:00
import org.jetbrains.annotations.ApiStatus ;
2020-07-21 00:16:46 +02:00
import org.jetbrains.annotations.NotNull ;
import org.jetbrains.annotations.Nullable ;
import java.util.List ;
import java.util.Set ;
2019-06-21 18:30:12 +02:00
import java.util.regex.Matcher ;
import java.util.regex.Pattern ;
2020-07-20 22:57:16 +02:00
import java.util.stream.Collectors ;
2019-06-21 18:30:12 +02:00
2020-07-21 00:16:46 +02:00
public final class PlaceholderAPI
{
2020-07-21 01:50:36 +02:00
private static final Replacer REPLACER_PERCENT = new CharsReplacer ( Closure . PERCENT ) ;
private static final Replacer REPLACER_BRACKET = new CharsReplacer ( Closure . BRACKET ) ;
2020-07-21 00:16:46 +02:00
@Deprecated
private static final Pattern PLACEHOLDER_PATTERN = Pattern . compile ( " [%]([^%]+)[%] " ) ;
@Deprecated
private static final Pattern BRACKET_PLACEHOLDER_PATTERN = Pattern . compile ( " [{]([^{}]+)[}] " ) ;
@Deprecated
private static final Pattern RELATIONAL_PLACEHOLDER_PATTERN = Pattern . compile ( " [%](rel_)([^%]+)[%] " ) ;
private PlaceholderAPI ( )
{
}
// === Current API ===
/ * *
* Translates all placeholders into their corresponding values .
* < br > The pattern of a valid placeholder is { @literal % < identifier > _ < params > % } .
*
* @param player Player to parse the placeholders against
* @param text Text to set the placeholder values in
* @return String containing all translated placeholders
* /
@NotNull
public static String setPlaceholders ( @Nullable final OfflinePlayer player , @NotNull final String text )
{
2020-07-24 20:30:57 +02:00
return REPLACER_PERCENT . apply ( text , player , PlaceholderAPIPlugin . getInstance ( ) . getLocalExpansionManager ( ) : : getExpansion ) ;
2020-07-21 00:16:46 +02:00
}
/ * *
* Translates all placeholders into their corresponding values .
* < br > The pattern of a valid placeholder is { @literal % < identifier > _ < params > % } .
*
* @param player Player to parse the placeholders against
* @param text List of Strings to set the placeholder values in
* @return String containing all translated placeholders
* /
@NotNull
2020-07-21 01:50:36 +02:00
public static List < String > setPlaceholders ( @Nullable final OfflinePlayer player , @NotNull final List < @NotNull String > text )
2020-07-21 00:16:46 +02:00
{
return text . stream ( ) . map ( line - > setPlaceholders ( player , line ) ) . collect ( Collectors . toList ( ) ) ;
}
2020-07-21 01:50:36 +02:00
/ * *
* Translates all placeholders into their corresponding values .
* < br > The pattern of a valid placeholder is { @literal { < identifier > _ < params > } } .
*
* @param player Player to parse the placeholders against
* @param text Text to set the placeholder values in
* @return String containing all translated placeholders
* /
@NotNull
public static String setBracketPlaceholders ( @Nullable final OfflinePlayer player , @NotNull final String text )
{
2020-07-24 20:30:57 +02:00
return REPLACER_BRACKET . apply ( text , player , PlaceholderAPIPlugin . getInstance ( ) . getLocalExpansionManager ( ) : : getExpansion ) ;
2020-07-21 01:50:36 +02:00
}
/ * *
* Translates all placeholders into their corresponding values .
* < br > The pattern of a valid placeholder is { @literal { < identifier > _ < params > } } .
*
* @param player Player to parse the placeholders against
* @param text List of Strings to set the placeholder values in
* @return String containing all translated placeholders
* /
@NotNull
public static List < String > setBracketPlaceholders ( @Nullable final OfflinePlayer player , @NotNull final List < @NotNull String > text )
{
return text . stream ( ) . map ( line - > setBracketPlaceholders ( player , line ) ) . collect ( Collectors . toList ( ) ) ;
}
2020-07-21 00:16:46 +02:00
/ * *
* Check if a specific placeholder identifier is currently registered
*
* @param identifier The identifier to check
* @return true if identifier is already registered
* /
public static boolean isRegistered ( @NotNull final String identifier )
{
2020-07-24 20:30:57 +02:00
return PlaceholderAPIPlugin . getInstance ( ) . getLocalExpansionManager ( ) . findExpansionByIdentifier ( identifier ) . isPresent ( ) ;
2020-07-21 00:16:46 +02:00
}
/ * *
* Get all registered placeholder identifiers
*
* @return All registered placeholder identifiers
* /
@NotNull
public static Set < String > getRegisteredIdentifiers ( )
{
2020-07-24 20:30:57 +02:00
return ImmutableSet . copyOf ( PlaceholderAPIPlugin . getInstance ( ) . getLocalExpansionManager ( ) . getIdentifiers ( ) ) ;
2020-07-21 00:16:46 +02:00
}
2020-07-27 17:40:58 +02:00
// === Deprecated API ===
2020-07-21 00:16:46 +02:00
/ * *
* Check if a String contains any PlaceholderAPI placeholders ( { @literal % < identifier > _ < params > % } ) .
*
* @param text String to check
* @return true if String contains any registered placeholder identifiers , false otherwise
2020-07-21 01:20:26 +02:00
* @deprecated Will be removed in a future release .
2020-07-21 00:16:46 +02:00
* /
@Deprecated
public static boolean containsPlaceholders ( String text )
{
return text ! = null & & PLACEHOLDER_PATTERN . matcher ( text ) . find ( ) ;
}
/ * *
* Check if a String contains any PlaceholderAPI bracket placeholders ( { @literal { < identifier > _ < params > } } ) .
*
* @param text String to check
* @return true if String contains any registered placeholder identifiers , false otherwise
2020-07-21 01:20:26 +02:00
* @deprecated Will be removed in a future release .
2020-07-21 00:16:46 +02:00
* /
@Deprecated
public static boolean containsBracketPlaceholders ( String text )
{
return text ! = null & & BRACKET_PLACEHOLDER_PATTERN . matcher ( text ) . find ( ) ;
}
/ * *
2020-07-30 15:30:11 +02:00
* set relational placeholders in the text specified placeholders are matched with the pattern
* % < rel_ ( identifier ) _ ( params ) > % when set with this method
2020-07-21 00:16:46 +02:00
*
2020-07-30 15:30:11 +02:00
* @param one First player to compare
* @param two Second player to compare
* @param text Text to parse the placeholders in
* @return The text containing the parsed relational placeholders
2020-07-21 01:20:26 +02:00
* @deprecated Use { @link # setPlaceholders ( OfflinePlayer , String ) } instead .
2020-07-21 00:16:46 +02:00
* /
@Deprecated
2020-07-30 15:30:11 +02:00
public static String setRelationalPlaceholders ( Player one , Player two , String text )
2020-07-21 00:16:46 +02:00
{
2020-07-30 15:30:11 +02:00
return setRelationalPlaceholders ( one , two , text , true ) ;
2020-07-21 00:16:46 +02:00
}
/ * *
* Translate placeholders in the provided List based on the relation of the two provided players .
* < br > The pattern of a valid placeholder is { @literal % rel_ < identifier > _ < param > % } .
*
* @param one Player to compare
* @param two Player to compare
* @param text text to parse the placeholder values to
* @return The text containing the parsed relational placeholders
2020-07-21 01:20:26 +02:00
* @deprecated Use { @link # setPlaceholders ( OfflinePlayer , List ) } instead .
2020-07-21 00:16:46 +02:00
* /
@Deprecated
public static List < String > setRelationalPlaceholders ( Player one , Player two , List < String > text )
{
return setRelationalPlaceholders ( one , two , text , true ) ;
}
/ * *
* Translate placeholders in the provided list based on the relation of the two provided players .
* < br > The pattern of a valid placeholder is { @literal % rel_ < identifier > _ < params > % } .
*
* @param one First player to compare
* @param two Second player to compare
* @param text Text to parse the placeholders in
* @param colorize If color codes ( & [ 0 - 1a - fk - o ] ) should be translated
* @return The text containing the parsed relational placeholders
2020-07-21 01:20:26 +02:00
* @deprecated Use { @link # setPlaceholders ( OfflinePlayer , List ) } instead .
2020-07-21 00:16:46 +02:00
* /
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static List < String > setRelationalPlaceholders ( Player one , Player two , List < String > text , boolean colorize )
{
if ( text = = null )
{
return null ;
}
return text . stream ( )
2020-07-30 15:30:11 +02:00
. map ( line - > setRelationalPlaceholders ( one , two , line , colorize ) )
. collect ( Collectors . toList ( ) ) ;
2020-07-21 00:16:46 +02:00
}
/ * *
* set relational placeholders in the text specified placeholders are matched with the pattern
* % < rel_ ( identifier ) _ ( params ) > % when set with this method
*
* @param one Player to compare
* @param two Player to compare
* @param text Text to parse the placeholders in
* @param colorize If color codes ( & [ 0 - 1a - fk - o ] ) should be translated
* @return The text containing the parsed relational placeholders
2020-07-21 01:20:26 +02:00
* @deprecated Use { @link # setPlaceholders ( OfflinePlayer , String ) } instead .
2020-07-21 00:16:46 +02:00
* /
@Deprecated
@SuppressWarnings ( " DuplicatedCode " )
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static String setRelationalPlaceholders ( Player one , Player two , String text , boolean colorize )
{
if ( text = = null )
{
return null ;
}
2020-07-24 20:30:57 +02:00
if ( PlaceholderAPIPlugin . getInstance ( ) . getLocalExpansionManager ( ) . getExpansionsCount ( ) = = 0 )
2020-07-21 00:16:46 +02:00
{
return colorize ? Msg . color ( text ) : text ;
}
2020-07-30 15:30:11 +02:00
final Matcher matcher = RELATIONAL_PLACEHOLDER_PATTERN . matcher ( text ) ;
2020-07-21 00:16:46 +02:00
while ( matcher . find ( ) )
{
final String format = matcher . group ( 2 ) ;
final int index = format . indexOf ( " _ " ) ;
if ( index < = 0 | | index > = format . length ( ) )
{
continue ;
}
2020-07-30 15:30:11 +02:00
String identifier = format . substring ( 0 , index ) . toLowerCase ( ) ;
String params = format . substring ( index + 1 ) ;
final PlaceholderExpansion expansion = PlaceholderAPIPlugin . getInstance ( ) . getLocalExpansionManager ( ) . getExpansion ( identifier ) ;
2020-07-21 00:16:46 +02:00
2020-07-30 15:30:11 +02:00
if ( ! ( expansion instanceof Relational ) )
2020-07-21 00:16:46 +02:00
{
continue ;
}
2020-07-30 15:30:11 +02:00
final String value = ( ( Relational ) expansion ) . onPlaceholderRequest ( one , two , params ) ;
2020-07-21 00:16:46 +02:00
if ( value ! = null )
{
text = text . replaceAll ( Pattern . quote ( matcher . group ( ) ) , Matcher . quoteReplacement ( value ) ) ;
}
}
return colorize ? Msg . color ( text ) : text ;
}
2020-07-30 15:53:12 +02:00
/ * *
* @deprecated Please use { @link me . clip . placeholderapi . expansion . PlaceholderExpansion } to register placeholders instead
* /
@Deprecated
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
public static boolean registerPlaceholderHook ( Plugin plugin , PlaceholderHook placeholderHook ) {
throw new UnsupportedOperationException ( plugin . getName ( ) + " is attempting to register placeholders via a PlaceholderHook class which is no longer supported! "
+ " Please reach out to " + plugin . getDescription ( ) . getAuthors ( ) . toString ( ) + " and let them know that they need to update ASAP! " ) ;
}
/ * *
* @deprecated Please use { @link me . clip . placeholderapi . expansion . PlaceholderExpansion } to register placeholders instead
* /
@Deprecated
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
public static boolean registerPlaceholderHook ( String identifier , PlaceholderHook placeholderHook ) {
throw new UnsupportedOperationException ( identifier + " is attempting to register placeholders via a PlaceholderHook class which is no longer supported! " ) ;
}
/ * *
* @deprecated Please use { @link me . clip . placeholderapi . expansion . PlaceholderExpansion } to unregister placeholders instead
* /
@Deprecated
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
public static boolean unregisterPlaceholderHook ( Plugin plugin ) {
throw new UnsupportedOperationException ( plugin . getName ( ) + " is attempting to unregister placeholders via the PlaceholderAPI class which is no longer supported! "
+ " Please reach out to " + plugin . getDescription ( ) . getAuthors ( ) . toString ( ) + " and let them know that they need to update ASAP! " ) ;
}
/ * *
* @deprecated Please use { @link me . clip . placeholderapi . expansion . PlaceholderExpansion } to unregister placeholders instead
* /
@Deprecated
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
public static boolean unregisterPlaceholderHook ( String identifier ) {
throw new UnsupportedOperationException ( identifier + " is attempting to unregister placeholders through the PlaceholderAPI class which is no longer supported! " ) ;
}
2020-07-30 15:30:11 +02:00
/ * *
* @deprecated Please use { @link # setPlaceholders ( OfflinePlayer , String ) } instead
* /
@NotNull
@Deprecated
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
public static String setPlaceholders ( @Nullable final OfflinePlayer player , @NotNull final String text , @NotNull final Pattern pattern , final boolean colorize )
{
return setPlaceholders ( player , text ) ;
}
/ * *
* @deprecated Please use { @link # setPlaceholders ( OfflinePlayer , List ) } instead
* /
@NotNull
@Deprecated
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
public static List < String > setPlaceholders ( @Nullable final OfflinePlayer player , @NotNull final List < String > text , @NotNull final Pattern pattern , final boolean colorize )
{
return setPlaceholders ( player , text ) ;
}
/ * *
* @deprecated Use { @link # setPlaceholders ( OfflinePlayer , List ) } instead .
* /
@Deprecated
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
public static List < String > setBracketPlaceholders ( OfflinePlayer player , List < String > text , boolean colorize )
{
return setPlaceholders ( player , text , BRACKET_PLACEHOLDER_PATTERN , colorize ) ;
}
/ * *
* @deprecated Use { @link # setPlaceholders ( OfflinePlayer , List ) } instead .
* /
@Deprecated
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
public static List < String > setPlaceholders ( OfflinePlayer player , List < String > text , boolean colorize )
{
return setPlaceholders ( player , text , PLACEHOLDER_PATTERN , colorize ) ;
}
/ * *
* @deprecated Use { @link # setPlaceholders ( OfflinePlayer , List ) } instead .
* /
@Deprecated
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
public static List < String > setPlaceholders ( OfflinePlayer player , List < String > text , Pattern pattern )
{
return setPlaceholders ( player , text , pattern , true ) ;
}
/ * *
* @deprecated Use { @link # setPlaceholders ( OfflinePlayer , String ) } instead .
* /
@Deprecated
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
public static String setBracketPlaceholders ( OfflinePlayer player , String text , boolean colorize )
{
return setPlaceholders ( player , text , BRACKET_PLACEHOLDER_PATTERN , colorize ) ;
}
/ * *
* @deprecated Use { @link # setPlaceholders ( OfflinePlayer , String ) } instead .
* /
@Deprecated
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
public static String setPlaceholders ( OfflinePlayer player , String text , boolean colorize )
{
return setPlaceholders ( player , text , PLACEHOLDER_PATTERN , colorize ) ;
}
/ * *
* @deprecated Use { @link # setPlaceholders ( OfflinePlayer , String ) } instead .
* /
@Deprecated
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
public static String setPlaceholders ( OfflinePlayer player , String text , Pattern pattern )
{
return setPlaceholders ( player , text , pattern , true ) ;
}
2020-07-21 00:16:46 +02:00
/ * *
2020-07-21 01:20:26 +02:00
* @deprecated Will be removed in a future release .
2020-07-21 00:16:46 +02:00
* /
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static Pattern getPlaceholderPattern ( )
{
return PLACEHOLDER_PATTERN ;
}
/ * *
2020-07-21 01:20:26 +02:00
* @deprecated Will be removed i n a future release .
2020-07-21 00:16:46 +02:00
* /
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static Pattern getBracketPlaceholderPattern ( )
{
return BRACKET_PLACEHOLDER_PATTERN ;
}
/ * *
2020-07-21 01:20:26 +02:00
* @deprecated Will be removed in a future release .
2020-07-21 00:16:46 +02:00
* /
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static Pattern getRelationalPlaceholderPattern ( )
{
return RELATIONAL_PLACEHOLDER_PATTERN ;
}
2020-07-21 01:50:36 +02:00
2020-07-21 01:20:26 +02:00
/ * *
* @deprecated Will be removed in a future release .
* /
2020-07-21 00:16:46 +02:00
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static Set < String > getRegisteredPlaceholderPlugins ( )
{
return getRegisteredIdentifiers ( ) ;
}
2020-07-21 01:50:36 +02:00
2020-07-21 01:20:26 +02:00
/ * *
* @deprecated Will be removed in a future release .
* /
2020-07-21 00:16:46 +02:00
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static Set < String > getExternalPlaceholderPlugins ( )
{
return null ;
}
2020-07-21 01:50:36 +02:00
2020-07-21 18:25:38 +02:00
/ * *
* @deprecated Will be removed in a future release .
* /
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-24 20:30:57 +02:00
public static String setPlaceholders ( Player player , String text )
{
2020-07-21 18:25:38 +02:00
return setPlaceholders ( ( ( OfflinePlayer ) player ) , text ) ;
}
2020-07-21 01:20:26 +02:00
/ * *
* @deprecated Will be removed in a future release .
* /
2020-07-21 00:16:46 +02:00
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static String setPlaceholders ( Player player , String text , boolean colorize )
{
return setPlaceholders ( player , text , PLACEHOLDER_PATTERN , colorize ) ;
}
2020-07-21 01:50:36 +02:00
2020-07-21 01:20:26 +02:00
/ * *
* @deprecated Will be removed in a future release .
* /
2020-07-21 00:16:46 +02:00
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static List < String > setPlaceholders ( Player player , List < String > text )
{
return setPlaceholders ( player , text , PLACEHOLDER_PATTERN , true ) ;
}
2020-07-21 01:50:36 +02:00
2020-07-21 01:20:26 +02:00
/ * *
* @deprecated Will be removed in a future release .
* /
2020-07-21 00:16:46 +02:00
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static List < String > setPlaceholders ( Player player , List < String > text , boolean colorize )
{
return setPlaceholders ( player , text , PLACEHOLDER_PATTERN , colorize ) ;
}
2020-07-21 01:50:36 +02:00
2020-07-21 01:20:26 +02:00
/ * *
* @deprecated Will be removed in a future release .
* /
2020-07-21 00:16:46 +02:00
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static String setBracketPlaceholders ( Player player , String text )
{
return setPlaceholders ( player , text , BRACKET_PLACEHOLDER_PATTERN , true ) ;
}
2020-07-21 01:50:36 +02:00
2020-07-21 01:20:26 +02:00
/ * *
* @deprecated Will be removed in a future release .
* /
2020-07-21 00:16:46 +02:00
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static String setBracketPlaceholders ( Player player , String text , boolean colorize )
{
return setPlaceholders ( player , text , BRACKET_PLACEHOLDER_PATTERN , colorize ) ;
}
2020-07-21 01:50:36 +02:00
2020-07-21 01:20:26 +02:00
/ * *
* @deprecated Will be removed in a future release .
* /
2020-07-21 00:16:46 +02:00
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static List < String > setBracketPlaceholders ( Player player , List < String > text )
{
return setPlaceholders ( player , text , BRACKET_PLACEHOLDER_PATTERN , true ) ;
}
2020-07-21 01:50:36 +02:00
2020-07-21 01:20:26 +02:00
/ * *
* @deprecated Will be removed in a future release .
* /
2020-07-21 00:16:46 +02:00
@Deprecated
2020-07-30 15:30:11 +02:00
@ApiStatus.ScheduledForRemoval ( inVersion = " 2.11.0 " )
2020-07-21 00:16:46 +02:00
public static List < String > setBracketPlaceholders ( Player player , List < String > text , boolean colorize )
{
return setPlaceholders ( player , text , BRACKET_PLACEHOLDER_PATTERN , colorize ) ;
}
2020-07-21 01:06:37 +02:00
}