From 2894d525f28f4e3843a55fb1e0d0e0284701eb9c Mon Sep 17 00:00:00 2001 From: extendedclip Date: Wed, 13 Jun 2018 14:14:27 -0400 Subject: [PATCH] Add deprecated setPlaceholders(Player) methods back to prevent exceptions with plugins parsing placeholders --- .../clip/placeholderapi/PlaceholderAPI.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java b/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java index cea175b..a899daa 100644 --- a/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java +++ b/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java @@ -163,6 +163,7 @@ public class PlaceholderAPI { return setPlaceholders(p, text, PLACEHOLDER_PATTERN); } + /** * set placeholders in the list text provided placeholders are matched with the pattern * %(identifier)_(params)>% when set with this method @@ -370,4 +371,24 @@ public class PlaceholderAPI { public static boolean unregisterPlaceholderHook(Plugin plugin) { return plugin != null && unregisterPlaceholderHook(plugin.getName()); } + + @Deprecated + public static String setPlaceholders(Player p, String text) { + return setPlaceholders((OfflinePlayer)p, text, PLACEHOLDER_PATTERN); + } + + @Deprecated + public static List setPlaceholders(Player p, List text) { + return setPlaceholders((OfflinePlayer)p, text, PLACEHOLDER_PATTERN); + } + + @Deprecated + public static String setBracketPlaceholders(Player p, String text) { + return setPlaceholders((OfflinePlayer)p, text, BRACKET_PLACEHOLDER_PATTERN); + } + + @Deprecated + public static List setBracketPlaceholders(Player p, List text) { + return setPlaceholders((OfflinePlayer)p, text, BRACKET_PLACEHOLDER_PATTERN); + } }