fix: fix FindAltsCommand for player name with spaces

This commit is contained in:
ChomeNS
2025-03-16 13:45:41 +07:00
parent bee4fb5d5b
commit 3771143e49
2 changed files with 4 additions and 3 deletions

View File

@@ -37,9 +37,10 @@ public class FindAltsCommand extends Command {
final boolean allServer = flag.equals("-allserver");
// ohio code
String player = !allServer ? flag : ""; // adds the first argument if no flag
player += context.getString(true, false);
final String restPlayer = context.getString(true, false);
if (!restPlayer.isEmpty()) player += " " + restPlayer;
final PlayerEntry playerEntry = bot.players.getEntry(player);