From 41d41444d1fe89ce7d51c1610508ac58852c1047 Mon Sep 17 00:00:00 2001 From: Duncan Townsend Date: Thu, 29 Jan 2015 00:28:05 -0500 Subject: [PATCH] Changed argument types of FilterCreatureOrPlayer to MageItem instead of Object. Both Permanent and Player inherit from MageItem, so it's more specific. --- Mage/src/mage/filter/common/FilterCreatureOrPlayer.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Mage/src/mage/filter/common/FilterCreatureOrPlayer.java b/Mage/src/mage/filter/common/FilterCreatureOrPlayer.java index 1e901f5161..14fc389fc7 100644 --- a/Mage/src/mage/filter/common/FilterCreatureOrPlayer.java +++ b/Mage/src/mage/filter/common/FilterCreatureOrPlayer.java @@ -34,6 +34,7 @@ import mage.filter.FilterPlayer; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import mage.MageItem; import java.util.UUID; @@ -41,7 +42,7 @@ import java.util.UUID; * * @author BetaSteward_at_googlemail.com */ -public class FilterCreatureOrPlayer extends FilterImpl implements FilterInPlay { +public class FilterCreatureOrPlayer extends FilterImpl implements FilterInPlay { protected FilterCreaturePermanent creatureFilter; protected FilterPlayer playerFilter; @@ -63,7 +64,7 @@ public class FilterCreatureOrPlayer extends FilterImpl implements Filter } @Override - public boolean match(Object o, Game game) { + public boolean match(MageItem o, Game game) { if (o instanceof Player) { return playerFilter.match((Player)o, game); } @@ -74,7 +75,7 @@ public class FilterCreatureOrPlayer extends FilterImpl implements Filter } @Override - public boolean match(Object o, UUID sourceId, UUID playerId, Game game) { + public boolean match(MageItem o, UUID sourceId, UUID playerId, Game game) { if (o instanceof Player) { return playerFilter.match((Player)o, sourceId, playerId, game); }