mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Prevent repeatable conceding (fixes #1526).
This commit is contained in:
parent
527bb2a492
commit
e2b62fecd8
1 changed files with 1 additions and 1 deletions
|
@ -1192,7 +1192,7 @@ public abstract class GameImpl implements Game, Serializable {
|
||||||
@Override
|
@Override
|
||||||
public synchronized void concede(UUID playerId) {
|
public synchronized void concede(UUID playerId) {
|
||||||
Player player = state.getPlayer(playerId);
|
Player player = state.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null && !player.hasLost()) {
|
||||||
logger.debug("Player " + player.getName() + " concedes game " + this.getId());
|
logger.debug("Player " + player.getName() + " concedes game " + this.getId());
|
||||||
fireInformEvent(player.getLogName() + " has conceded.");
|
fireInformEvent(player.getLogName() + " has conceded.");
|
||||||
player.concede(this);
|
player.concede(this);
|
||||||
|
|
Loading…
Reference in a new issue