mirror of
https://github.com/correl/mage.git
synced 2024-11-24 19:19:56 +00:00
Minor fix for user handling.
This commit is contained in:
parent
d5284ae226
commit
8221a68efe
1 changed files with 5 additions and 3 deletions
|
@ -170,9 +170,11 @@ public class TournamentSession {
|
|||
}
|
||||
|
||||
private void removeTournamentForUser() {
|
||||
UserManager.instance.getUser(userId).ifPresent(user
|
||||
-> user.removeTournament(playerId));
|
||||
|
||||
Optional<User> user = UserManager.instance.getUser(userId);
|
||||
if (user.isPresent()) {
|
||||
user.get().removeTable(playerId);
|
||||
user.get().removeTournament(playerId);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue