diff --git a/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java b/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java index 8f5a31791f..f82dda7b13 100644 --- a/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java +++ b/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java @@ -569,8 +569,12 @@ public class PlayAreaPanel extends javax.swing.JPanel { } public void setMenuStates(boolean manaPoolAutomatic, boolean manaPoolAutomaticRestricted) { - manaPoolMenuItem1.setSelected(manaPoolAutomatic); - manaPoolMenuItem2.setSelected(manaPoolAutomaticRestricted); + if (manaPoolMenuItem1 != null) { + manaPoolMenuItem1.setSelected(manaPoolAutomatic); + } + if (manaPoolMenuItem2 != null) { + manaPoolMenuItem2.setSelected(manaPoolAutomaticRestricted); + } } private mage.client.game.BattlefieldPanel battlefieldPanel; diff --git a/Mage.Server/src/main/java/mage/server/game/GameController.java b/Mage.Server/src/main/java/mage/server/game/GameController.java index 5f541cc186..44f72a2a2a 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameController.java +++ b/Mage.Server/src/main/java/mage/server/game/GameController.java @@ -602,8 +602,8 @@ public class GameController implements GameCallback { if (grantingPlayer.isHuman()) { GameSessionPlayer gameSession = gameSessions.get(userIdGranter); if (gameSession != null) { - UUID requestingPlayer = getPlayerId(userIdRequester); - if (requestingPlayer == null || !requestingPlayer.equals(grantingPlayer.getId())) { // don't allow request for your own cards + UUID requestingPlayerId = getPlayerId(userIdRequester); + if (requestingPlayerId == null || !requestingPlayerId.equals(grantingPlayer.getId())) { // don't allow request for your own cards if (grantingPlayer.isRequestToShowHandCardsAllowed()) { gameSession.requestPermissionToSeeHandCards(userIdRequester); } else { diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index 7accbb420a..d008337270 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -209,7 +209,6 @@ public abstract class PlayerImpl implements Player, Serializable { protected Set playersUnderYourControl = new HashSet<>(); protected Set usersAllowedToSeeHandCards = new HashSet<>(); - protected boolean requestsAllowedToSeeHandCards = true; protected List attachments = new ArrayList<>(); @@ -3113,7 +3112,7 @@ public abstract class PlayerImpl implements Player, Serializable { @Override public boolean isRequestToShowHandCardsAllowed() { - return userData.allowRequestShowHandCards(); + return userData.isAllowRequestShowHandCards(); } @Override diff --git a/Mage/src/mage/players/net/UserData.java b/Mage/src/mage/players/net/UserData.java index b1b83a7a7c..101325ec66 100644 --- a/Mage/src/mage/players/net/UserData.java +++ b/Mage/src/mage/players/net/UserData.java @@ -28,6 +28,7 @@ public class UserData implements Serializable { this.userSkipPrioritySteps = userSkipPrioritySteps; this.confirmEmptyManaPool = confirmEmptyManaPool; this.flagName = flagName; + this.askMoveToGraveOrder = askMoveToGraveOrder; } public void setGroupId(int groupId) { @@ -50,20 +51,16 @@ public class UserData implements Serializable { return showAbilityPickerForced; } - public boolean isAllowRequestShowHandCards() { - return allowRequestShowHandCards; - } - public void setShowAbilityPickerForced(boolean showAbilityPickerForced) { this.showAbilityPickerForced = showAbilityPickerForced; } - public void setAllowRequestShowHandCards(boolean allowRequestShowHandCards) { - this.allowRequestShowHandCards = allowRequestShowHandCards; + public boolean isAllowRequestShowHandCards() { + return allowRequestShowHandCards; } - public boolean allowRequestShowHandCards() { - return allowRequestShowHandCards; + public void setAllowRequestShowHandCards(boolean allowRequestShowHandCards) { + this.allowRequestShowHandCards = allowRequestShowHandCards; } public UserSkipPrioritySteps getUserSkipPrioritySteps() {