Skip to content

Commit

Permalink
fix: getAnyClanPlayer(String) requesting data from Mojang servers
Browse files Browse the repository at this point in the history
  • Loading branch information
RoinujNosde committed Dec 21, 2024
1 parent a759884 commit 9097fa0
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,16 @@ public ClanPlayer getAnyClanPlayer(UUID uuid) {
@Nullable
public ClanPlayer getAnyClanPlayer(String playerName) {
for (ClanPlayer cp : getAllClanPlayers()) {
if (cp.getName().equals(playerName)) {
if (cp.getName().equalsIgnoreCase(playerName)) {
return cp;
}
}
return getAnyClanPlayer(Bukkit.getOfflinePlayer(playerName).getUniqueId());
for (OfflinePlayer player : Bukkit.getOfflinePlayers()) {
if (player.getName().equalsIgnoreCase(playerName)) {
return getAnyClanPlayer(player.getUniqueId());
}
}
return null;
}

/**
Expand Down

0 comments on commit 9097fa0

Please sign in to comment.