mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 22:17:17 +00:00
Fix IllegalArgumentException with tab completion on EditHome
This commit is contained in:
1 parent
3f0bae97ef
commit
97df373fbb
1 file changed
+6
-1
@@ -220,7 +220,12 @@ public class EditHomeCommand extends CommandBase implements TabCompleter {
|
||||
}
|
||||
if (args.length == 1) {
|
||||
final List<String> tabCompletions = new ArrayList<>();
|
||||
StringUtil.copyPartialMatches(args[0], HomeCommand.Tab.getHomeTabCache().get(p.getUniqueId()), tabCompletions);
|
||||
final List<String> homes = HomeCommand.Tab.getHomeTabCache().get(p.getUniqueId());
|
||||
if (homes == null) {
|
||||
HomeCommand.Tab.updatePlayerHomeCache(p);
|
||||
return Collections.emptyList();
|
||||
}
|
||||
StringUtil.copyPartialMatches(args[0], homes, tabCompletions);
|
||||
Collections.sort(tabCompletions);
|
||||
return tabCompletions;
|
||||
} else if (args.length == 2) {
|
||||
|
||||
Reference in new issue
Block a user