From 1f2eae07999ec2d8a872352f9922dd6478c57b3c Mon Sep 17 00:00:00 2001 From: BuildTools Date: Fri, 29 Mar 2019 23:56:40 -0500 Subject: [PATCH] Don't load the players profile just to get their name --- src/main/java/com/gmail/nossr50/api/ExperienceAPI.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/api/ExperienceAPI.java b/src/main/java/com/gmail/nossr50/api/ExperienceAPI.java index 0d72b5333..c8862f22b 100644 --- a/src/main/java/com/gmail/nossr50/api/ExperienceAPI.java +++ b/src/main/java/com/gmail/nossr50/api/ExperienceAPI.java @@ -806,7 +806,7 @@ public final class ExperienceAPI { */ @Deprecated public static int getPlayerRankSkill(String playerName, String skillType) { - return mcMMO.getDatabaseManager().readRank(getOfflineProfile(playerName).getPlayerName()).get(getNonChildSkillType(skillType)); + return mcMMO.getDatabaseManager().readRank(mcMMO.p.getServer().getOfflinePlayer(playerName).getName()).get(getNonChildSkillType(skillType)); } /** @@ -824,7 +824,7 @@ public final class ExperienceAPI { * @return the position on the leaderboard */ public static int getPlayerRankSkill(UUID uuid, String skillType) { - return mcMMO.getDatabaseManager().readRank(getOfflineProfile(uuid).getPlayerName()).get(getNonChildSkillType(skillType)); + return mcMMO.getDatabaseManager().readRank(mcMMO.p.getServer().getOfflinePlayer(uuid).getName()).get(getNonChildSkillType(skillType)); } /** @@ -840,7 +840,7 @@ public final class ExperienceAPI { */ @Deprecated public static int getPlayerRankOverall(String playerName) { - return mcMMO.getDatabaseManager().readRank(getOfflineProfile(playerName).getPlayerName()).get(null); + return mcMMO.getDatabaseManager().readRank(mcMMO.p.getServer().getOfflinePlayer(playerName).getName()).get(null); } /** @@ -855,7 +855,7 @@ public final class ExperienceAPI { * @return the position on the power level leaderboard */ public static int getPlayerRankOverall(UUID uuid) { - return mcMMO.getDatabaseManager().readRank(getOfflineProfile(uuid).getPlayerName()).get(null); + return mcMMO.getDatabaseManager().readRank(mcMMO.p.getServer().getOfflinePlayer(uuid).getName()).get(null); } /**