forked from External/mage
clean up some null checks
This commit is contained in:
parent
188a09b8fb
commit
7b4acbe386
3 changed files with 6 additions and 11 deletions
|
|
@ -266,13 +266,13 @@ public class GameController implements GameCallback {
|
|||
|
||||
public void join(UUID userId) {
|
||||
UUID playerId = userPlayerMap.get(userId);
|
||||
Optional<User> user = UserManager.instance.getUser(userId);
|
||||
if (userId == null || playerId == null) {
|
||||
if (playerId == null) {
|
||||
logger.fatal("Join game failed!");
|
||||
logger.fatal("- gameId: " + game.getId());
|
||||
logger.fatal("- userId: " + userId);
|
||||
return;
|
||||
}
|
||||
Optional<User> user = UserManager.instance.getUser(userId);
|
||||
if (!user.isPresent()) {
|
||||
logger.fatal("User not found : " + userId);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue