Do not deprecate legacy setPlaceholder methods for now

This commit is contained in:
extendedclip 2018-07-21 22:00:33 -04:00
parent 736b8ada3d
commit 7ea2bd94a7

View File

@ -46,8 +46,7 @@ public class PlaceholderAPI {
private static final Pattern PLACEHOLDER_PATTERN = Pattern.compile("[%]([^%]+)[%]"); private static final Pattern PLACEHOLDER_PATTERN = Pattern.compile("[%]([^%]+)[%]");
private static final Pattern BRACKET_PLACEHOLDER_PATTERN = Pattern.compile("[{]([^{}]+)[}]"); private static final Pattern BRACKET_PLACEHOLDER_PATTERN = Pattern.compile("[{]([^{}]+)[}]");
private static final Pattern RELATIONAL_PLACEHOLDER_PATTERN = Pattern private static final Pattern RELATIONAL_PLACEHOLDER_PATTERN = Pattern.compile("[%](rel_)([^%]+)[%]");
.compile("[%](rel_)([^%]+)[%]");
private static final Map<String, PlaceholderHook> placeholders = new HashMap<>(); private static final Map<String, PlaceholderHook> placeholders = new HashMap<>();
private PlaceholderAPI() { private PlaceholderAPI() {
@ -374,22 +373,18 @@ public class PlaceholderAPI {
return plugin != null && unregisterPlaceholderHook(plugin.getName()); return plugin != null && unregisterPlaceholderHook(plugin.getName());
} }
@Deprecated
public static String setPlaceholders(Player p, String text) { public static String setPlaceholders(Player p, String text) {
return setPlaceholders((OfflinePlayer) p, text, PLACEHOLDER_PATTERN); return setPlaceholders((OfflinePlayer) p, text, PLACEHOLDER_PATTERN);
} }
@Deprecated
public static List<String> setPlaceholders(Player p, List<String> text) { public static List<String> setPlaceholders(Player p, List<String> text) {
return setPlaceholders((OfflinePlayer) p, text, PLACEHOLDER_PATTERN); return setPlaceholders((OfflinePlayer) p, text, PLACEHOLDER_PATTERN);
} }
@Deprecated
public static String setBracketPlaceholders(Player p, String text) { public static String setBracketPlaceholders(Player p, String text) {
return setPlaceholders((OfflinePlayer) p, text, BRACKET_PLACEHOLDER_PATTERN); return setPlaceholders((OfflinePlayer) p, text, BRACKET_PLACEHOLDER_PATTERN);
} }
@Deprecated
public static List<String> setBracketPlaceholders(Player p, List<String> text) { public static List<String> setBracketPlaceholders(Player p, List<String> text) {
return setPlaceholders((OfflinePlayer) p, text, BRACKET_PLACEHOLDER_PATTERN); return setPlaceholders((OfflinePlayer) p, text, BRACKET_PLACEHOLDER_PATTERN);
} }