thrownewIllegalStateException("A player cannot be in a match and in the queue at the same time.");
}
The fix is to add another check to the command handler for whether the player is in a match, and if so, print a more useful error message.
If a match participant runs `/sb`, they receive an internal error message and a stacktrace is printed to console.
The root cause is the `join_queue` command handler neglects to check if the player is in a match.
https://git.logal.dev/LogalDeveloper/Snowbrawl/src/commit/8102c217bb441af8397ebbc5052af0cb09e74bb3/src/main/java/dev/logal/snowbrawl/CommandHandler.java#L60-L77
Luckily, nothing actually breaks. A lower level check is performed by the MatchManager which prevents the player from actually joining the queue.
https://git.logal.dev/LogalDeveloper/Snowbrawl/src/commit/8102c217bb441af8397ebbc5052af0cb09e74bb3/src/main/java/dev/logal/snowbrawl/managers/MatchManager.java#L62-L64
The fix is to add another check to the command handler for whether the player is in a match, and if so, print a more useful error message.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
If a match participant runs
/sb, they receive an internal error message and a stacktrace is printed to console.The root cause is the
join_queuecommand handler neglects to check if the player is in a match.Luckily, nothing actually breaks. A lower level check is performed by the MatchManager which prevents the player from actually joining the queue.
The fix is to add another check to the command handler for whether the player is in a match, and if so, print a more useful error message.