Skip to content

Commit

Permalink
GH-446 Hot fix offline player NPE. (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rollczi authored Oct 13, 2024
1 parent 5b38ea3 commit fa71234
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ public OfflinePlayerArgument(Server server, Plugin plugin, boolean enableThreadC

// Server#getOfflinePlayers() can be blocking, so we don't want to call it every time
for (OfflinePlayer offlinePlayer : server.getOfflinePlayers()) {
this.nicknames.add(offlinePlayer.getName());
String name = offlinePlayer.getName();

if (name != null) {
this.nicknames.add(name);
}
}

// Save new joining player names so our suggestions are more wide
Expand Down

0 comments on commit fa71234

Please sign in to comment.