diff --git a/common/src/main/java/dev/xhyrom/lighteco/common/command/suggestion/type/OfflineUserSuggestionProvider.java b/common/src/main/java/dev/xhyrom/lighteco/common/command/suggestion/type/OfflineUserSuggestionProvider.java index cef1398..be9a802 100644 --- a/common/src/main/java/dev/xhyrom/lighteco/common/command/suggestion/type/OfflineUserSuggestionProvider.java +++ b/common/src/main/java/dev/xhyrom/lighteco/common/command/suggestion/type/OfflineUserSuggestionProvider.java @@ -22,11 +22,9 @@ public class OfflineUserSuggestionProvider implements SuggestionProvider context, SuggestionsBuilder builder) { LightEcoPlugin plugin = context.getSource().plugin(); - String remaining = builder.getRemaining(); - for (UUID uniqueId : plugin.getBootstrap().getOnlinePlayers()) { User user = plugin.getUserManager().getIfLoaded(uniqueId); - if (user == null) continue; + if (user == null || user.getUsername() == null) continue; builder.suggest(user.getUsername()); }