mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Fix tp parsing & teleporting networked users by name
This commit is contained in:
3 files changed
+3
-6
No files matched your search
@@ -50,7 +50,7 @@ public class TpCommand extends Command implements TabProvider {
|
||||
}
|
||||
|
||||
target = executor.hasPermission(getPermission("coordinates"))
|
||||
? parsePositionArgs(basePosition, args, 0) : Optional.empty();
|
||||
? parsePositionArgs(basePosition, args, 1) : Optional.empty();
|
||||
if (target.isPresent() && args.length >= 1) {
|
||||
this.execute(executor, Teleportable.username(args[0]), target.get(), args);
|
||||
return;
|
||||
|
||||
@@ -55,9 +55,6 @@ public class TpOfflineCommand extends InGameCommand implements UserListTabProvid
|
||||
.teleporter(user)
|
||||
.target(position.get())
|
||||
.toTeleport().execute();
|
||||
|
||||
plugin.getLocales().getLocale("teleporting_offline_complete", target.getUsername())
|
||||
.ifPresent(user::sendMessage);
|
||||
} catch (TeleportationException e) {
|
||||
e.displayMessage(user, plugin, args);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user