mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Add player arg to list
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user