From 7c4b833d804ff66bc4dbf0882490f0226ca0d953 Mon Sep 17 00:00:00 2001 From: LoJoSho Date: Sun, 4 Feb 2024 19:20:37 -0600 Subject: [PATCH] fix: tab autocomplete checks attempted before user loading causing NPE --- .../hmccosmetics/command/CosmeticCommandTabComplete.java | 1 + 1 file changed, 1 insertion(+) diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/command/CosmeticCommandTabComplete.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/command/CosmeticCommandTabComplete.java index 463d7d1d..0af5468e 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/command/CosmeticCommandTabComplete.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/command/CosmeticCommandTabComplete.java @@ -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();