9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-29 03:49:19 +00:00

fix: tab autocomplete checks attempted before user loading causing NPE

This commit is contained in:
LoJoSho
2024-02-04 19:20:37 -06:00
parent b291dc4c9f
commit 7c4b833d80

View File

@@ -52,6 +52,7 @@ public class CosmeticCommandTabComplete implements TabCompleter {
if (!(sender instanceof Player)) return completions;
CosmeticUser user = CosmeticUsers.getUser(((Player) sender).getUniqueId());
if (user == null) return completions; // User hasn't loaded in yet, can't do proper checks
if (args.length == 2) {
String subcommand = args[0].toLowerCase();