* Tiny Leaders - Preserved deck name for Leader name.

This commit is contained in:
LevelX2 2015-03-05 07:49:42 +01:00
parent 4d0dbb2327
commit 15d95f0fee
2 changed files with 6 additions and 0 deletions

View file

@ -398,6 +398,8 @@ public abstract class MatchImpl implements Match {
public void submitDeck(UUID playerId, Deck deck) {
MatchPlayer player = getPlayer(playerId);
if (player != null) {
// make sure the deck name (needed for Tiny Leaders) won't get lost by sideboarding
deck.setName(player.getDeck().getName());
player.submitDeck(deck);
}
synchronized (this) {

View file

@ -87,6 +87,10 @@ public class MatchPlayer {
}
public void updateDeck(Deck deck) {
if (this.deck != null) {
// preserver deck name, important for Tiny Leaders format
deck.setName(this.getDeck().getName());
}
this.deck = deck;
}