mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-21 01:01:35 +08:00
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:
parent
80fb91b6d7
commit
1fed7a9a3a
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user