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
This commit is contained in:
pop4959 2020-11-14 14:50:48 -08:00 committed by GitHub
parent 80fb91b6d7
commit 1fed7a9a3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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<String> homes = sender.isPlayer() ? new ArrayList<>() : user.getHomes();
final List<String> homes = user == null ? new ArrayList<>() : user.getHomes();
if (canDelOthers) {
final int sepIndex = args[0].indexOf(':');
if (sepIndex < 0) {