mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Abeyance - Fixed possible null pointer exception.
This commit is contained in:
parent
a4afdb8d3f
commit
e475ad9df7
1 changed files with 4 additions and 5 deletions
|
@ -27,6 +27,8 @@
|
|||
*/
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
|
@ -41,9 +43,6 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
|
@ -103,7 +102,7 @@ class AbeyanceEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getPlayerId().equals(source.getFirstTarget())) {
|
||||
if (source.getFirstTarget() != null && source.getFirstTarget().equals(event.getPlayerId())) {
|
||||
MageObject object = game.getObject(event.getSourceId());
|
||||
if (event.getType() == GameEvent.EventType.CAST_SPELL) {
|
||||
if (object.isInstant() || object.isSorcery()) {
|
||||
|
|
Loading…
Reference in a new issue