mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 20:32:06 -08:00
* Fixed possible null pointer exception.
This commit is contained in:
parent
6fe58db97d
commit
5701c36446
2 changed files with 8 additions and 3 deletions
|
|
@ -196,7 +196,12 @@ public class TargetPlayer extends TargetImpl {
|
|||
public String getTargetedName(Game game) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (UUID targetId: getTargets()) {
|
||||
sb.append(game.getPlayer(targetId).getName()).append(" ");
|
||||
Player player = game.getPlayer(targetId);
|
||||
if (player != null) {
|
||||
sb.append(player.getName()).append(" ");
|
||||
} else {
|
||||
sb.append("[target missing]");
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue