Merge pull request #3843 from Ineusia/master

Minor API fix
This commit is contained in:
Robert A. C 2019-03-30 17:09:27 -07:00 committed by GitHub
commit 57b31b60b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -783,7 +783,7 @@ public final class ExperienceAPI {
*/ */
@Deprecated @Deprecated
public static int getPlayerRankSkill(String playerName, String skillType) { 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));
} }
/** /**
@ -801,7 +801,7 @@ public final class ExperienceAPI {
* @return the position on the leaderboard * @return the position on the leaderboard
*/ */
public static int getPlayerRankSkill(UUID uuid, String skillType) { 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));
} }
/** /**
@ -817,7 +817,7 @@ public final class ExperienceAPI {
*/ */
@Deprecated @Deprecated
public static int getPlayerRankOverall(String playerName) { 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);
} }
/** /**
@ -832,7 +832,7 @@ public final class ExperienceAPI {
* @return the position on the power level leaderboard * @return the position on the power level leaderboard
*/ */
public static int getPlayerRankOverall(UUID uuid) { 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);
} }
/** /**