Add deprecated setPlaceholders(Player) methods back to prevent exceptions with plugins parsing placeholders

This commit is contained in:
extendedclip 2018-06-13 14:14:27 -04:00
parent 53fb678035
commit 2894d525f2
1 changed files with 21 additions and 0 deletions

View File

@ -163,6 +163,7 @@ public class PlaceholderAPI {
return setPlaceholders(p, text, PLACEHOLDER_PATTERN);
}
/**
* set placeholders in the list<String> 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<String> setPlaceholders(Player p, List<String> 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<String> setBracketPlaceholders(Player p, List<String> text) {
return setPlaceholders((OfflinePlayer)p, text, BRACKET_PLACEHOLDER_PATTERN);
}
}