Fix tphere not returning an error for unresolved players

This commit is contained in:
William committed 2022-11-23 01:33:52 +00:00
1 parent 8854d3569f
commit 10b398b783
9 files changed
+56 -24

No files matched your search

@@ -165,7 +165,7 @@ public class TpCommand extends CommandBase implements TabCompletable, ConsoleExe
plugin.getLoggingAdapter().log(Level.WARNING, "Invalid syntax. Usage: tp <player> <destination>");
return;
}
final OnlineUser playerToTeleport = plugin.findPlayer(args[0]).orElse(null);
final OnlineUser playerToTeleport = plugin.findOnlinePlayer(args[0]).orElse(null);
if (playerToTeleport == null) {
plugin.getLoggingAdapter().log(Level.WARNING, "Player not found: " + args[0]);
return;