Cleanup now that server is no longer sending MageObject in ClientMessage (#10986)

This commit is contained in:
Susucre 2023-08-24 12:22:03 +02:00 committed by GitHub
parent 5062c84098
commit 5cedc3258a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,6 @@ import mage.abilities.MageSingleton;
import mage.abilities.Mode;
import mage.constants.EffectType;
import mage.constants.Outcome;
import mage.players.Player;
import mage.target.targetpointer.FirstTargetPointer;
import mage.target.targetpointer.TargetPointer;
@ -105,12 +104,6 @@ public abstract class EffectImpl implements Effect {
values = new HashMap<>();
}
}
if (value instanceof Player) {
// If Player are set as value, there might be PlayerImpl serialized in ClientMessage's GameView.
// That does cause the message's data to not be unzippable, since the PlayerImpl class are not
// client-side.
throw new IllegalArgumentException("Players should not be set as value, set the UUID instead.");
}
values.put(key, value);
}