Merge pull request #355 from Andre601/patch-3

Add missing @deprecated notes to methods
This commit is contained in:
Sxtanna 2020-07-20 19:26:56 -04:00 committed by GitHub
commit 9217147827
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,7 +228,7 @@ public final class PlaceholderAPI
}
// === Deprecated API === (please don't use this, thank you - Sxtanna :P)
// === Deprecated API ===
/**
* Translates all placeholders into their corresponding values.
@ -240,7 +240,7 @@ public final class PlaceholderAPI
* identifier from the params
* @param colorize If color codes (&[0-1a-fk-o]) should be translated
* @return The text containing the parsed placeholders
* @deprecated this will do absolutely nothing different
* @deprecated Please use {@link #setPlaceholders(OfflinePlayer, String)} instead
*/
@NotNull
@Deprecated
@ -259,6 +259,7 @@ public final class PlaceholderAPI
* identifier from the params
* @param colorize If color codes (&[0-1a-fk-o]) should be translated
* @return String containing all translated placeholders
* @deprecated Please use {@link #setPlaceholders(OfflinePlayer, List)} instead
*/
@NotNull
@Deprecated
@ -282,6 +283,7 @@ public final class PlaceholderAPI
*
* @param text String to check
* @return true if String contains any registered placeholder identifiers, false otherwise
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static boolean containsPlaceholders(String text)
@ -294,6 +296,7 @@ public final class PlaceholderAPI
*
* @param text String to check
* @return true if String contains any registered placeholder identifiers, false otherwise
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static boolean containsBracketPlaceholders(String text)
@ -308,6 +311,7 @@ public final class PlaceholderAPI
* @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
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*/
@Deprecated
public static List<String> setBracketPlaceholders(OfflinePlayer player, List<String> text)
@ -323,6 +327,7 @@ public final class PlaceholderAPI
* @param text List of Strings to set the placeholder values in
* @param colorize If color codes (&[0-1a-fk-o]) should be translated
* @return String containing all translated placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*/
@Deprecated
public static List<String> setBracketPlaceholders(OfflinePlayer player, List<String> text, boolean colorize)
@ -338,6 +343,7 @@ public final class PlaceholderAPI
* @param text List of Strings to set the placeholder values in
* @param colorize If color codes (&[0-1a-fk-o]) should be translated
* @return String containing all translated placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*/
@Deprecated
public static List<String> setPlaceholders(OfflinePlayer player, List<String> text, boolean colorize)
@ -354,6 +360,7 @@ public final class PlaceholderAPI
* @param pattern The pattern to match placeholders to. Capture group 1 must contain an underscore separating the
* identifier from the params
* @return String containing all translated placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*/
@Deprecated
public static List<String> setPlaceholders(OfflinePlayer player, List<String> text, Pattern pattern)
@ -368,6 +375,7 @@ public final class PlaceholderAPI
* @param player Player to parse the placeholders against
* @param text Text to set the placeholder values in
* @return String containing all translated placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/
@Deprecated
public static String setBracketPlaceholders(OfflinePlayer player, String text)
@ -383,6 +391,7 @@ public final class PlaceholderAPI
* @param text Text to set the placeholder values in
* @param colorize If color codes (&[0-1a-fk-o]) should be translated
* @return String containing all translated placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/
@Deprecated
public static String setBracketPlaceholders(OfflinePlayer player, String text, boolean colorize)
@ -398,6 +407,7 @@ public final class PlaceholderAPI
* @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 placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/
@Deprecated
public static String setPlaceholders(OfflinePlayer player, String text, boolean colorize)
@ -414,6 +424,7 @@ public final class PlaceholderAPI
* @param pattern The pattern to match placeholders to. Capture group 1 must contain an underscore separating the
* identifier from the params
* @return The text containing the parsed placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/
@Deprecated
public static String setPlaceholders(OfflinePlayer player, String text, Pattern pattern)
@ -429,6 +440,7 @@ public final class PlaceholderAPI
* @param two Player to compare
* @param text text to parse the placeholder values to
* @return The text containing the parsed relational placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*/
@Deprecated
public static List<String> setRelationalPlaceholders(Player one, Player two, List<String> text)
@ -445,6 +457,7 @@ public final class PlaceholderAPI
* @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
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*/
@Deprecated
public static List<String> setRelationalPlaceholders(Player one, Player two, List<String> text, boolean colorize)
@ -467,6 +480,7 @@ public final class PlaceholderAPI
* @param two Second player to compare
* @param text Text to parse the placeholders in
* @return The text containing the parsed relational placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/
@Deprecated
public static String setRelationalPlaceholders(Player one, Player two, String text)
@ -483,6 +497,7 @@ public final class PlaceholderAPI
* @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
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/
@Deprecated
@SuppressWarnings("DuplicatedCode")
@ -535,6 +550,7 @@ public final class PlaceholderAPI
* Gets the placeholder pattern for the default placeholders.
*
* @return The pattern for {@literal %<identifier>_<params>%}
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static Pattern getPlaceholderPattern()
@ -546,6 +562,7 @@ public final class PlaceholderAPI
* Gets the placeholder pattern for the bracket placeholders.
*
* @return The pattern for {@literal {<identifier>_<params>}}
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static Pattern getBracketPlaceholderPattern()
@ -557,67 +574,94 @@ public final class PlaceholderAPI
* Gets the placeholder pattern for the relational placeholders.
*
* @return The pattern for {@literal %rel_<identifier>_<params>%}
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static Pattern getRelationalPlaceholderPattern()
{
return RELATIONAL_PLACEHOLDER_PATTERN;
}
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static Set<String> getRegisteredPlaceholderPlugins()
{
return getRegisteredIdentifiers();
}
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static Set<String> getExternalPlaceholderPlugins()
{
return null;
}
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static String setPlaceholders(Player player, String text, boolean colorize)
{
return setPlaceholders(player, text, PLACEHOLDER_PATTERN, colorize);
}
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static List<String> setPlaceholders(Player player, List<String> text)
{
return setPlaceholders(player, text, PLACEHOLDER_PATTERN, true);
}
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static List<String> setPlaceholders(Player player, List<String> text, boolean colorize)
{
return setPlaceholders(player, text, PLACEHOLDER_PATTERN, colorize);
}
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static String setBracketPlaceholders(Player player, String text)
{
return setPlaceholders(player, text, BRACKET_PLACEHOLDER_PATTERN, true);
}
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static String setBracketPlaceholders(Player player, String text, boolean colorize)
{
return setPlaceholders(player, text, BRACKET_PLACEHOLDER_PATTERN, colorize);
}
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static List<String> setBracketPlaceholders(Player player, List<String> text)
{
return setPlaceholders(player, text, BRACKET_PLACEHOLDER_PATTERN, true);
}
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated
public static List<String> setBracketPlaceholders(Player player, List<String> text, boolean colorize)
{
return setPlaceholders(player, text, BRACKET_PLACEHOLDER_PATTERN, colorize);
}
}
}