forked from External/mage
add some Java8 magic to the server
This commit is contained in:
parent
9bea7c7df2
commit
50f28a2bf7
7 changed files with 46 additions and 56 deletions
|
|
@ -334,10 +334,10 @@ public class User {
|
|||
}
|
||||
for (Iterator<Entry<UUID, UUID>> iterator = userTournaments.entrySet().iterator(); iterator.hasNext();) {
|
||||
Entry<UUID, UUID> next = iterator.next();
|
||||
TournamentController tournamentController = TournamentManager.instance.getTournamentController(next.getValue());
|
||||
if (tournamentController != null) {
|
||||
Optional<TournamentController> tournamentController = TournamentManager.instance.getTournamentController(next.getValue());
|
||||
if (tournamentController.isPresent()) {
|
||||
ccTournamentStarted(next.getValue(), next.getKey());
|
||||
tournamentController.rejoin(next.getKey());
|
||||
tournamentController.get().rejoin(next.getKey());
|
||||
} else {
|
||||
iterator.remove(); // tournament has ended meanwhile
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue