Won't send to log empty entries

This commit is contained in:
Maxmtg
2013-05-28 15:27:59 +00:00
parent a211222b3e
commit 226f2e90a9

View File

@@ -23,6 +23,8 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import forge.Card; import forge.Card;
import forge.GameEventType; import forge.GameEventType;
import forge.card.ability.AbilityFactory; import forge.card.ability.AbilityFactory;
@@ -150,6 +152,8 @@ public class ReplacementHandler {
ReplacementResult res = this.executeReplacement(runParams, chosenRE, decider, game); ReplacementResult res = this.executeReplacement(runParams, chosenRE, decider, game);
if (res != ReplacementResult.NotReplaced) { if (res != ReplacementResult.NotReplaced) {
chosenRE.setHasRun(false); chosenRE.setHasRun(false);
String message = chosenRE.toString();
if ( !StringUtils.isEmpty(message))
game.getGameLog().add(GameEventType.EFFECT_REPLACED, chosenRE.toString()); game.getGameLog().add(GameEventType.EFFECT_REPLACED, chosenRE.toString());
return res; return res;
} else { } else {