mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Fix tphere not returning an error for unresolved players
This commit is contained in:
1 parent
8854d3569f
commit
10b398b783
9 files changed
+56
-24
No files matched your search
@@ -31,7 +31,7 @@ public class RtpCommand extends CommandBase implements ConsoleExecutable {
|
||||
plugin.getLocales().getLocale("error_no_permission").ifPresent(onlineUser::sendMessage);
|
||||
return;
|
||||
}
|
||||
Optional<OnlineUser> foundUser = plugin.findPlayer(args[0]);
|
||||
final Optional<OnlineUser> foundUser = plugin.findOnlinePlayer(args[0]);
|
||||
if (foundUser.isEmpty()) {
|
||||
plugin.getLocales().getLocale("error_player_not_found", args[0])
|
||||
.ifPresent(onlineUser::sendMessage);
|
||||
@@ -102,7 +102,7 @@ public class RtpCommand extends CommandBase implements ConsoleExecutable {
|
||||
plugin.getLoggingAdapter().log(Level.WARNING, "Invalid syntax. Usage: rtp [player]");
|
||||
return;
|
||||
}
|
||||
final Optional<OnlineUser> foundUser = plugin.findPlayer(args[0]);
|
||||
final Optional<OnlineUser> foundUser = plugin.findOnlinePlayer(args[0]);
|
||||
if (foundUser.isEmpty()) {
|
||||
plugin.getLoggingAdapter().log(Level.WARNING, "Player not found: " + args[0]);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user