Fix local username closest-match resolution overriding global exact matches (#392)

This commit is contained in:
William authored and GitHub committed 2023-05-05 17:45:29 +01:00
1 parent b1bd44ac64
commit daa72182f8
11 files changed
+85 -23

No files matched your search

@@ -50,7 +50,7 @@ public class RtpCommand extends Command implements UserListTabProvider {
@Override
public void execute(@NotNull CommandUser executor, @NotNull String[] args) {
final Optional<OnlineUser> optionalTeleporter = args.length >= 1 ? plugin.findOnlinePlayer(args[0])
final Optional<OnlineUser> optionalTeleporter = args.length >= 1 ? plugin.getOnlineUser(args[0])
: executor instanceof OnlineUser ? Optional.of((OnlineUser) executor) : Optional.empty();
if (optionalTeleporter.isEmpty()) {
if (args.length == 0) {