mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Fixed NPE error in drafting and disconnected player
This commit is contained in:
parent
6a9a4c78ca
commit
30389e426f
1 changed files with 5 additions and 3 deletions
|
@ -158,9 +158,11 @@ public abstract class DraftImpl implements Draft {
|
|||
|
||||
@Override
|
||||
public void autoPick(UUID playerId) {
|
||||
List<Card> booster = players.get(playerId).getBooster();
|
||||
if (booster.size() > 0) {
|
||||
this.addPick(playerId, booster.get(booster.size() - 1).getId(), null);
|
||||
if (players.containsKey(playerId)) {
|
||||
List<Card> booster = players.get(playerId).getBooster();
|
||||
if (booster.size() > 0) {
|
||||
this.addPick(playerId, booster.get(booster.size() - 1).getId(), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue