Made the slash optional in fml confirm/cancel. (#6282)
This commit is contained in:
parent
b8ea220925
commit
7f8b30aed3
1 changed files with 4 additions and 3 deletions
|
@ -280,22 +280,23 @@ public class StartupQuery {
|
||||||
for (Iterator<PendingCommand> it = dedServer.pendingCommandList.iterator(); it.hasNext(); )
|
for (Iterator<PendingCommand> it = dedServer.pendingCommandList.iterator(); it.hasNext(); )
|
||||||
{
|
{
|
||||||
String cmd = it.next().command.trim().toLowerCase();
|
String cmd = it.next().command.trim().toLowerCase();
|
||||||
|
cmd = cmd.charAt(0) == '/' ? cmd.substring(1) : cmd; // strip the forward slash to make it optional
|
||||||
|
|
||||||
if (cmd.equals("/fml confirm"))
|
if (cmd.equals("fml confirm"))
|
||||||
{
|
{
|
||||||
LOGGER.info(SQ, "confirmed");
|
LOGGER.info(SQ, "confirmed");
|
||||||
query.setResult(true);
|
query.setResult(true);
|
||||||
done = true;
|
done = true;
|
||||||
it.remove();
|
it.remove();
|
||||||
}
|
}
|
||||||
else if (cmd.equals("/fml cancel"))
|
else if (cmd.equals("fml cancel"))
|
||||||
{
|
{
|
||||||
LOGGER.info(SQ, "cancelled");
|
LOGGER.info(SQ, "cancelled");
|
||||||
query.setResult(false);
|
query.setResult(false);
|
||||||
done = true;
|
done = true;
|
||||||
it.remove();
|
it.remove();
|
||||||
}
|
}
|
||||||
else if (cmd.equals("/stop"))
|
else if (cmd.equals("stop"))
|
||||||
{
|
{
|
||||||
StartupQuery.abort();
|
StartupQuery.abort();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue