mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Prefer using Collections.emptyList() rather than new ArrayList
This commit is contained in:
6 files changed
+14
-13
No files matched your search
@@ -218,7 +218,7 @@ public class EdithomeCommand extends CommandBase implements TabCompleter {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
Player p = (Player) sender;
|
||||
if (!p.hasPermission("huskhomes.edithome")) {
|
||||
return new ArrayList<>();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (args.length == 1) {
|
||||
final List<String> tabCompletions = new ArrayList<>();
|
||||
@@ -236,7 +236,7 @@ public class EdithomeCommand extends CommandBase implements TabCompleter {
|
||||
}
|
||||
return editHomeOptions;
|
||||
} else {
|
||||
return new ArrayList<>();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user