Add player arg to list

This commit is contained in:
William committed 2023-03-26 00:58:16 +00:00
1 parent 322694bff9
commit 07dcac1493
2 files changed
+2 -3

No files matched your search

@@ -18,8 +18,7 @@ public abstract class HomeCommand extends SavedPositionCommand<Home> {
@Override
public void execute(@NotNull CommandUser executor, @NotNull Home home, @NotNull String[] args) {
final Optional<Teleportable> optionalTeleporter = parseStringArg(args, 0).map(Teleportable::username)
.or(() -> executor instanceof Teleportable ? Optional.of((Teleportable) executor) : Optional.empty());
final Optional<Teleportable> optionalTeleporter = resolveTeleporter(executor, args);
if (optionalTeleporter.isEmpty()) {
plugin.getLocales().getLocale("error_invalid_syntax", getUsage())
.ifPresent(executor::sendMessage);