Skip to content

Commit

Permalink
Check that the offline player name isn't null.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitsugaru committed Jun 4, 2014
1 parent 576b4d5 commit 9b1d1e2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/org/black_ixx/playerpoints/PlayerPoints.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,12 @@ public UUID translateNameToUUID(String name) {

// Attempt local lookup
for(OfflinePlayer p : Bukkit.getServer().getOfflinePlayers()) {
if(p != null && p.getName().toLowerCase().equals(name.toLowerCase())) {
id = p.getUniqueId();
break;
if(p != null) {
String offlineName = p.getName();
if(offlineName != null && offlineName.toLowerCase().equals(name.toLowerCase())) {
id = p.getUniqueId();
break;
}
}
}

Expand Down

0 comments on commit 9b1d1e2

Please sign in to comment.