use of mage.game.match.MatchPlayer in project mage by magefree.
the class GameController method viewSideboard.
private void viewSideboard(UUID playerId, UUID userId, UUID targetPlayerId) {
Player needPlayer = game.getPlayer(playerId);
if (needPlayer != null && needPlayer.isHuman()) {
for (MatchPlayer p : managerFactory.tableManager().getTable(tableId).getMatch().getPlayers()) {
if (p.getPlayer().getId().equals(playerId)) {
Optional<User> u = managerFactory.userManager().getUser(userId);
u.ifPresent(user -> user.ccViewSideboard(tableId, game.getId(), targetPlayerId));
}
}
}
}
Aggregations