mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 14:38:53 +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
|
@Override
|
||||||
public void execute(@NotNull CommandUser executor, @NotNull Home home, @NotNull String[] args) {
|
public void execute(@NotNull CommandUser executor, @NotNull Home home, @NotNull String[] args) {
|
||||||
final Optional<Teleportable> optionalTeleporter = parseStringArg(args, 0).map(Teleportable::username)
|
final Optional<Teleportable> optionalTeleporter = resolveTeleporter(executor, args);
|
||||||
.or(() -> executor instanceof Teleportable ? Optional.of((Teleportable) executor) : Optional.empty());
|
|
||||||
if (optionalTeleporter.isEmpty()) {
|
if (optionalTeleporter.isEmpty()) {
|
||||||
plugin.getLocales().getLocale("error_invalid_syntax", getUsage())
|
plugin.getLocales().getLocale("error_invalid_syntax", getUsage())
|
||||||
.ifPresent(executor::sendMessage);
|
.ifPresent(executor::sendMessage);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.Optional;
|
|||||||
public class WarpCommand extends SavedPositionCommand<Warp> {
|
public class WarpCommand extends SavedPositionCommand<Warp> {
|
||||||
|
|
||||||
protected WarpCommand(@NotNull HuskHomes plugin) {
|
protected WarpCommand(@NotNull HuskHomes plugin) {
|
||||||
super("warp", List.of(), Warp.class, List.of(), plugin);
|
super("warp", List.of(), Warp.class, List.of("player"), plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in new issue
Block a user