mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
Sonar fixes
remove the deprecated GameState.getWatchers()
This commit is contained in:
parent
90bf7bd18c
commit
63718e7a6e
28 changed files with 70 additions and 72 deletions
|
|
@ -531,11 +531,6 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
return this.turnMods;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Watchers getWatchers() {
|
||||
return this.watchers;
|
||||
}
|
||||
|
||||
public <T extends Watcher> T getWatcher(Class<T> watcherClass) {
|
||||
return watcherClass.cast(watchers.get(watcherClass.getSimpleName()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public abstract class GameTinyLeadersImpl extends GameImpl {
|
|||
// ability.addEffect(new CommanderManaReplacementEffect(player.getId(), CardUtil.getColorIdentity(commander)));
|
||||
getState().setValue(commander.getId() + "_castCount", 0);
|
||||
CommanderInfoWatcher watcher = new CommanderInfoWatcher(commander.getId(), false);
|
||||
getState().getWatchers().add(watcher);
|
||||
getState().addWatcher(watcher);
|
||||
watcher.addCardInfoToCommander(this);
|
||||
} else {
|
||||
throw new UnknownError("Commander card could not be created. Name: [" + player.getMatchPlayer().getDeck().getName() + ']');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue