From 1fed7a9a3a8e4ffc9af62db96ac1793f3ba21c3b Mon Sep 17 00:00:00 2001 From: pop4959 Date: Sat, 14 Nov 2020 14:50:48 -0800 Subject: [PATCH] Fix tab completion for delhome (#3775) There was a minor issue with one line of code in delhome which was causing the user's homes not to be listed since the condition was effectively reversed. This was also causing an NPE for console senders attempting to tab complete. Fixes #3774 --- .../src/com/earth2me/essentials/commands/Commanddelhome.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java b/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java index 93e0cfdaa..74d5a5176 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java @@ -57,7 +57,7 @@ public class Commanddelhome extends EssentialsCommand { final IUser user = sender.getUser(ess); final boolean canDelOthers = sender.isAuthorized("essentials.delhome.others", ess); if (args.length == 1) { - final List homes = sender.isPlayer() ? new ArrayList<>() : user.getHomes(); + final List homes = user == null ? new ArrayList<>() : user.getHomes(); if (canDelOthers) { final int sepIndex = args[0].indexOf(':'); if (sepIndex < 0) {