mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-26 18:47:57 +01:00
Merge pull request #3440 from GiovanH/patch-1
Handle playerdata without bukkit.lastKnownName info
This commit is contained in:
commit
03182ea24c
@ -297,6 +297,11 @@ public final class CommandUtils {
|
||||
for (OfflinePlayer offlinePlayer : mcMMO.p.getServer().getOfflinePlayers()) {
|
||||
String playerName = offlinePlayer.getName();
|
||||
|
||||
if (playerName == null) { //Do null checking here to detect corrupted data before sending it throuogh .equals
|
||||
System.err.println("[McMMO] Player data file with UIID " + offlinePlayer.getUniqueId() + " is missing a player name. This may be a legacy file from before bukkit.lastKnownName. This should be okay to ignore.");
|
||||
continue; //Don't let an error here interrupt the loop
|
||||
}
|
||||
|
||||
if (partialName.equalsIgnoreCase(playerName)) {
|
||||
// Exact match
|
||||
matchedPlayers.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user