Add deprecation notice to all methods

Was it so hard to do a Ctrl+C, Ctrl+V?
This commit is contained in:
Andre601 2020-07-21 01:20:26 +02:00
parent 51f61f61af
commit 75004f08d0

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. * Translates all placeholders into their corresponding values.
@ -240,8 +240,7 @@ public final class PlaceholderAPI
* identifier from the params * identifier from the params
* @param colorize If color codes (&[0-1a-fk-o]) should be translated * @param colorize If color codes (&[0-1a-fk-o]) should be translated
* @return The text containing the parsed placeholders * @return The text containing the parsed placeholders
* * @deprecated Please use {@link #setPlaceholders(OfflinePlayer, String)} instead
* @deprecated Please use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/ */
@NotNull @NotNull
@Deprecated @Deprecated
@ -260,6 +259,7 @@ public final class PlaceholderAPI
* identifier from the params * identifier from the params
* @param colorize If color codes (&[0-1a-fk-o]) should be translated * @param colorize If color codes (&[0-1a-fk-o]) should be translated
* @return String containing all translated placeholders * @return String containing all translated placeholders
* @deprecated Please use {@link #setPlaceholders(OfflinePlayer, List)} instead
*/ */
@NotNull @NotNull
@Deprecated @Deprecated
@ -283,6 +283,7 @@ public final class PlaceholderAPI
* *
* @param text String to check * @param text String to check
* @return true if String contains any registered placeholder identifiers, false otherwise * @return true if String contains any registered placeholder identifiers, false otherwise
* @deprecated Will be removed in a future release.
*/ */
@Deprecated @Deprecated
public static boolean containsPlaceholders(String text) public static boolean containsPlaceholders(String text)
@ -295,6 +296,7 @@ public final class PlaceholderAPI
* *
* @param text String to check * @param text String to check
* @return true if String contains any registered placeholder identifiers, false otherwise * @return true if String contains any registered placeholder identifiers, false otherwise
* @deprecated Will be removed in a future release.
*/ */
@Deprecated @Deprecated
public static boolean containsBracketPlaceholders(String text) public static boolean containsBracketPlaceholders(String text)
@ -309,6 +311,7 @@ public final class PlaceholderAPI
* @param player Player to parse the placeholders against * @param player Player to parse the placeholders against
* @param text List of Strings to set the placeholder values in * @param text List of Strings to set the placeholder values in
* @return String containing all translated placeholders * @return String containing all translated placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*/ */
@Deprecated @Deprecated
public static List<String> setBracketPlaceholders(OfflinePlayer player, List<String> text) public static List<String> setBracketPlaceholders(OfflinePlayer player, List<String> text)
@ -324,6 +327,7 @@ public final class PlaceholderAPI
* @param text List of Strings to set the placeholder values in * @param text List of Strings to set the placeholder values in
* @param colorize If color codes (&[0-1a-fk-o]) should be translated * @param colorize If color codes (&[0-1a-fk-o]) should be translated
* @return String containing all translated placeholders * @return String containing all translated placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*/ */
@Deprecated @Deprecated
public static List<String> setBracketPlaceholders(OfflinePlayer player, List<String> text, boolean colorize) public static List<String> setBracketPlaceholders(OfflinePlayer player, List<String> text, boolean colorize)
@ -339,6 +343,7 @@ public final class PlaceholderAPI
* @param text List of Strings to set the placeholder values in * @param text List of Strings to set the placeholder values in
* @param colorize If color codes (&[0-1a-fk-o]) should be translated * @param colorize If color codes (&[0-1a-fk-o]) should be translated
* @return String containing all translated placeholders * @return String containing all translated placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*/ */
@Deprecated @Deprecated
public static List<String> setPlaceholders(OfflinePlayer player, List<String> text, boolean colorize) public static List<String> setPlaceholders(OfflinePlayer player, List<String> text, boolean colorize)
@ -355,6 +360,7 @@ public final class PlaceholderAPI
* @param pattern The pattern to match placeholders to. Capture group 1 must contain an underscore separating the * @param pattern The pattern to match placeholders to. Capture group 1 must contain an underscore separating the
* identifier from the params * identifier from the params
* @return String containing all translated placeholders * @return String containing all translated placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*/ */
@Deprecated @Deprecated
public static List<String> setPlaceholders(OfflinePlayer player, List<String> text, Pattern pattern) public static List<String> setPlaceholders(OfflinePlayer player, List<String> text, Pattern pattern)
@ -369,6 +375,7 @@ public final class PlaceholderAPI
* @param player Player to parse the placeholders against * @param player Player to parse the placeholders against
* @param text Text to set the placeholder values in * @param text Text to set the placeholder values in
* @return String containing all translated placeholders * @return String containing all translated placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/ */
@Deprecated @Deprecated
public static String setBracketPlaceholders(OfflinePlayer player, String text) public static String setBracketPlaceholders(OfflinePlayer player, String text)
@ -384,6 +391,7 @@ public final class PlaceholderAPI
* @param text Text to set the placeholder values in * @param text Text to set the placeholder values in
* @param colorize If color codes (&[0-1a-fk-o]) should be translated * @param colorize If color codes (&[0-1a-fk-o]) should be translated
* @return String containing all translated placeholders * @return String containing all translated placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/ */
@Deprecated @Deprecated
public static String setBracketPlaceholders(OfflinePlayer player, String text, boolean colorize) public static String setBracketPlaceholders(OfflinePlayer player, String text, boolean colorize)
@ -399,6 +407,7 @@ public final class PlaceholderAPI
* @param text Text to parse the placeholders in * @param text Text to parse the placeholders in
* @param colorize If color codes (&[0-1a-fk-o]) should be translated * @param colorize If color codes (&[0-1a-fk-o]) should be translated
* @return The text containing the parsed placeholders * @return The text containing the parsed placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/ */
@Deprecated @Deprecated
public static String setPlaceholders(OfflinePlayer player, String text, boolean colorize) public static String setPlaceholders(OfflinePlayer player, String text, boolean colorize)
@ -415,6 +424,7 @@ public final class PlaceholderAPI
* @param pattern The pattern to match placeholders to. Capture group 1 must contain an underscore separating the * @param pattern The pattern to match placeholders to. Capture group 1 must contain an underscore separating the
* identifier from the params * identifier from the params
* @return The text containing the parsed placeholders * @return The text containing the parsed placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/ */
@Deprecated @Deprecated
public static String setPlaceholders(OfflinePlayer player, String text, Pattern pattern) public static String setPlaceholders(OfflinePlayer player, String text, Pattern pattern)
@ -430,6 +440,7 @@ public final class PlaceholderAPI
* @param two Player to compare * @param two Player to compare
* @param text text to parse the placeholder values to * @param text text to parse the placeholder values to
* @return The text containing the parsed relational placeholders * @return The text containing the parsed relational placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*/ */
@Deprecated @Deprecated
public static List<String> setRelationalPlaceholders(Player one, Player two, List<String> text) public static List<String> setRelationalPlaceholders(Player one, Player two, List<String> text)
@ -446,6 +457,7 @@ public final class PlaceholderAPI
* @param text Text to parse the placeholders in * @param text Text to parse the placeholders in
* @param colorize If color codes (&[0-1a-fk-o]) should be translated * @param colorize If color codes (&[0-1a-fk-o]) should be translated
* @return The text containing the parsed relational placeholders * @return The text containing the parsed relational placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*/ */
@Deprecated @Deprecated
public static List<String> setRelationalPlaceholders(Player one, Player two, List<String> text, boolean colorize) public static List<String> setRelationalPlaceholders(Player one, Player two, List<String> text, boolean colorize)
@ -468,6 +480,7 @@ public final class PlaceholderAPI
* @param two Second player to compare * @param two Second player to compare
* @param text Text to parse the placeholders in * @param text Text to parse the placeholders in
* @return The text containing the parsed relational placeholders * @return The text containing the parsed relational placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/ */
@Deprecated @Deprecated
public static String setRelationalPlaceholders(Player one, Player two, String text) public static String setRelationalPlaceholders(Player one, Player two, String text)
@ -484,6 +497,7 @@ public final class PlaceholderAPI
* @param text Text to parse the placeholders in * @param text Text to parse the placeholders in
* @param colorize If color codes (&[0-1a-fk-o]) should be translated * @param colorize If color codes (&[0-1a-fk-o]) should be translated
* @return The text containing the parsed relational placeholders * @return The text containing the parsed relational placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/ */
@Deprecated @Deprecated
@SuppressWarnings("DuplicatedCode") @SuppressWarnings("DuplicatedCode")
@ -536,6 +550,7 @@ public final class PlaceholderAPI
* Gets the placeholder pattern for the default placeholders. * Gets the placeholder pattern for the default placeholders.
* *
* @return The pattern for {@literal %<identifier>_<params>%} * @return The pattern for {@literal %<identifier>_<params>%}
* @deprecated Will be removed in a future release.
*/ */
@Deprecated @Deprecated
public static Pattern getPlaceholderPattern() public static Pattern getPlaceholderPattern()
@ -547,6 +562,7 @@ public final class PlaceholderAPI
* Gets the placeholder pattern for the bracket placeholders. * Gets the placeholder pattern for the bracket placeholders.
* *
* @return The pattern for {@literal {<identifier>_<params>}} * @return The pattern for {@literal {<identifier>_<params>}}
* @deprecated Will be removed in a future release.
*/ */
@Deprecated @Deprecated
public static Pattern getBracketPlaceholderPattern() public static Pattern getBracketPlaceholderPattern()
@ -558,6 +574,7 @@ public final class PlaceholderAPI
* Gets the placeholder pattern for the relational placeholders. * Gets the placeholder pattern for the relational placeholders.
* *
* @return The pattern for {@literal %rel_<identifier>_<params>%} * @return The pattern for {@literal %rel_<identifier>_<params>%}
* @deprecated Will be removed in a future release.
*/ */
@Deprecated @Deprecated
public static Pattern getRelationalPlaceholderPattern() public static Pattern getRelationalPlaceholderPattern()
@ -566,55 +583,81 @@ public final class PlaceholderAPI
} }
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated @Deprecated
public static Set<String> getRegisteredPlaceholderPlugins() public static Set<String> getRegisteredPlaceholderPlugins()
{ {
return getRegisteredIdentifiers(); return getRegisteredIdentifiers();
} }
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated @Deprecated
public static Set<String> getExternalPlaceholderPlugins() public static Set<String> getExternalPlaceholderPlugins()
{ {
return null; return null;
} }
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated @Deprecated
public static String setPlaceholders(Player player, String text, boolean colorize) public static String setPlaceholders(Player player, String text, boolean colorize)
{ {
return setPlaceholders(player, text, PLACEHOLDER_PATTERN, colorize); return setPlaceholders(player, text, PLACEHOLDER_PATTERN, colorize);
} }
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated @Deprecated
public static List<String> setPlaceholders(Player player, List<String> text) public static List<String> setPlaceholders(Player player, List<String> text)
{ {
return setPlaceholders(player, text, PLACEHOLDER_PATTERN, true); return setPlaceholders(player, text, PLACEHOLDER_PATTERN, true);
} }
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated @Deprecated
public static List<String> setPlaceholders(Player player, List<String> text, boolean colorize) public static List<String> setPlaceholders(Player player, List<String> text, boolean colorize)
{ {
return setPlaceholders(player, text, PLACEHOLDER_PATTERN, colorize); return setPlaceholders(player, text, PLACEHOLDER_PATTERN, colorize);
} }
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated @Deprecated
public static String setBracketPlaceholders(Player player, String text) public static String setBracketPlaceholders(Player player, String text)
{ {
return setPlaceholders(player, text, BRACKET_PLACEHOLDER_PATTERN, true); return setPlaceholders(player, text, BRACKET_PLACEHOLDER_PATTERN, true);
} }
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated @Deprecated
public static String setBracketPlaceholders(Player player, String text, boolean colorize) public static String setBracketPlaceholders(Player player, String text, boolean colorize)
{ {
return setPlaceholders(player, text, BRACKET_PLACEHOLDER_PATTERN, colorize); return setPlaceholders(player, text, BRACKET_PLACEHOLDER_PATTERN, colorize);
} }
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated @Deprecated
public static List<String> setBracketPlaceholders(Player player, List<String> text) public static List<String> setBracketPlaceholders(Player player, List<String> text)
{ {
return setPlaceholders(player, text, BRACKET_PLACEHOLDER_PATTERN, true); return setPlaceholders(player, text, BRACKET_PLACEHOLDER_PATTERN, true);
} }
/**
* @deprecated Will be removed in a future release.
*/
@Deprecated @Deprecated
public static List<String> setBracketPlaceholders(Player player, List<String> text, boolean colorize) public static List<String> setBracketPlaceholders(Player player, List<String> text, boolean colorize)
{ {