Deprecate getQuester(String) method for external use

This commit is contained in:
PikaMug 2020-01-15 15:07:47 -05:00
parent ebbbcb9cd1
commit 39826eb0b8
2 changed files with 4 additions and 0 deletions

View File

@ -1335,6 +1335,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
/** /**
* Get online Quester from player name * Get online Quester from player name
* *
* @deprecated Use {@link #getQuester(UUID)}
* @param name Player name * @param name Player name
* @return Quester, or null if offline * @return Quester, or null if offline
*/ */

View File

@ -579,6 +579,7 @@ public class CmdExecutor implements CommandExecutor {
return true; return true;
} }
@SuppressWarnings("deprecation")
private void questsStats(final CommandSender cs, String[] args) { private void questsStats(final CommandSender cs, String[] args) {
Quester quester; Quester quester;
if (args != null) { if (args != null) {
@ -1271,6 +1272,7 @@ public class CmdExecutor implements CommandExecutor {
private void adminReset(final CommandSender cs, String[] args) { private void adminReset(final CommandSender cs, String[] args) {
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.reset")) { if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.reset")) {
@SuppressWarnings("deprecation")
Quester quester = plugin.getQuester(args[1]); Quester quester = plugin.getQuester(args[1]);
if (quester == null) { if (quester == null) {
cs.sendMessage(ChatColor.YELLOW + Lang.get("playerNotFound")); cs.sendMessage(ChatColor.YELLOW + Lang.get("playerNotFound"));
@ -1324,6 +1326,7 @@ public class CmdExecutor implements CommandExecutor {
private void adminRemove(final CommandSender cs, String[] args) { private void adminRemove(final CommandSender cs, String[] args) {
if (cs.hasPermission("quests.admin.*") && cs.hasPermission("quests.admin.remove")) { if (cs.hasPermission("quests.admin.*") && cs.hasPermission("quests.admin.remove")) {
@SuppressWarnings("deprecation")
Quester quester = plugin.getQuester(args[1]); Quester quester = plugin.getQuester(args[1]);
if (quester == null) { if (quester == null) {
cs.sendMessage(ChatColor.YELLOW + Lang.get("playerNotFound")); cs.sendMessage(ChatColor.YELLOW + Lang.get("playerNotFound"));