Merge pull request #10 from Fysac/master

Null pointer check
This commit is contained in:
Lishid 2014-08-03 17:58:31 -04:00
commit be5f784d74

View file

@ -81,9 +81,12 @@ public class PlayerDataManager implements IPlayerDataManager {
for (OfflinePlayer player : offlinePlayers) {
String name = player.getName();
if (name.equalsIgnoreCase(search))
if (name == null){
continue;
}
if (name.equalsIgnoreCase(search)){
return player.getUniqueId();
}
if (name.toLowerCase().startsWith(lowerSearch)) {
int curDelta = name.length() - lowerSearch.length();
if (curDelta < delta) {