mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 11:49:56 -08:00
GameState: Reduced null pointer exception probablity for getTriggered.
This commit is contained in:
parent
a3213fb786
commit
6b22afd18a
1 changed files with 1 additions and 2 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.game;
|
package mage.game;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -911,7 +910,7 @@ public class GameState implements Serializable, Copyable<GameState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TriggeredAbility> getTriggered(UUID controllerId) {
|
public List<TriggeredAbility> getTriggered(UUID controllerId) {
|
||||||
return triggered.stream().filter(triggeredAbility -> triggeredAbility.getControllerId().equals(controllerId))
|
return triggered.stream().filter(triggeredAbility -> controllerId.equals(triggeredAbility.getControllerId()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue